Return to Snippet

Revision: 60115
at October 21, 2012 09:02 by o0110o


Initial Code
function txt_between($content,$start,$end,$is_string=null){
  if (!$is_string) { $string = file_content($content); } // Is it a string or a file
  $output = explode($start, $string);
  if (isset($output[1])){
    $r = explode($end, $output[1]);
    return $output[0];
  }
}

Initial URL

                                

Initial Description
Get the text in between more text in a string. Accepts $content,$start,$end & $is_string as parameters.

Initial Title
Get the text in between more text in a string.

Initial Tags
php, text

Initial Language
PHP