note 113169 deleted from function.substr by philip

From: Date: Wed, 26 Feb 2014 00:08:12 +0000
Subject: note 113169 deleted from function.substr by philip
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-198715@lists.php.net to get a copy of this message
Note Submitter: smapan atsign gmail dot com ---- /** Simple function for get text between text @param string $input The input string. Must be one character or longer. @param string $start The start string. Must be one character or longer. @param string $start The end string. Must be one character or longer. @Returns the extracted part of string betweent start end end string; or FALSE on failure, or an empty string. */ function get_text_between($input, $start, $end) { $a = strpos($input, $start); $b = strlen($start); return substr($input, $a, strpos($input, $end, $a + $b) - $a + $b*2); }

« previous php.notes (#198715) next »