note 45383 deleted from function.strstr by thiago
| From: | thiago@php.net | Date: | Tue, 28 Oct 2008 13:46:24 +0000 |
| Subject: | note 45383 deleted from function.strstr by thiago | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-145872@lists.php.net to get a copy of this message | ||
Note Submitter: steve at alittlefinesse dot com
----
// I needed to find the content between 2 chrs in a string and this was the quickest method I could
find.
function SeekVal($str_in) {
$tween=""; // not needed but good practise when appending
$chr1='[';
$chr2=']';
for ($i=strpos($str_in, $chr1);$i<strpos($str_in, $chr2);$i++)
$tween=$tween+$str_in[$i];
return $tween;
}