php get string : get_area(content, start, end)


SUBMITTED BY: sukamanahh

DATE: Jan. 1, 2016, 2:21 a.m.

FORMAT: Text only

SIZE: 261 Bytes

HITS: 378

  1. <?php
  2. function get_area($content, $start, $end){
  3. $ex = explode($start, $content);
  4. $ex2 = explode($end, $ex[1]);
  5. return $ex2[0];
  6. }
  7. $string = "just test 1";
  8. //get and print 'test' string
  9. $output = get_area($string, "just", "1");
  10. print $output;
  11. ?>

comments powered by Disqus