note 37226 deleted from function.substr by didou

From: Date: Fri, 07 Nov 2003 08:38:48 +0000
Subject: note 37226 deleted from function.substr by didou
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-60057@lists.php.net to get a copy of this message
Note Submitter: wels@advanets.com ---- #here is a way to get a sub string that is encapsulated #between two known strings #for example: $myContent =" I live in New York City "; $myStartSub = "live in"; $myEndSub ="City"; $my_substr= substr($myContent,strpos($myContent,$myStartSub ), strpos($myContent,$myEndSub)-strpos($myContent,$myStartSub )); echo $my_substr; # the end result would be # myEndSub = " New York "

« previous php.notes (#60057) next »