Get the text in between more text in a string.
Get the text in between more text in a string. Accepts $content,$start,$end & $is_string as parameters.
Copy this code and paste it in your HTML
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); return $output[0];
}
}
Report this snippet
Comments
Subscribe to comments