note 45383 added to function.strstr

From: Date: Sat, 04 Sep 2004 03:55:11 +0000
Subject: note 45383 added to function.strstr
Groups: php.notes 
Request: Send a blank email to php-notes+get-76006@lists.php.net to get a copy of this message
// 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; } ---- Manual Page -- http://www.php.net/manual/en/function.strstr.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+45383 Delete -- http://master.php.net/manage/user-notes.php?action=delete+45383&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+45383&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#76006) next »