note 51522 added to function.strpos

From: Date: Sat, 02 Apr 2005 15:14:47 +0000
Subject: note 51522 added to function.strpos
Groups: php.notes 
Request: Send a blank email to php-notes+get-87346@lists.php.net to get a copy of this message
You know how long it took me to find out how to find a string between two chrs. Well here it is: $start=strpos($string,"$" ); $start=$start + strlen("$"); $end=(strpos($string, "</B>")); $num= ($end - $start); $number=substr($string,$start,$num); string: style="float:right">$62</B> See I wanted to find the number 62 between $ and </B> So that I could times it by 10. For some odd reason when I turn this into a function it does not work. ---- Manual Page -- http://www.php.net/manual/en/function.strpos.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+51522 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+51522&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+51522&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+51522&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+51522&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+51522&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+51522&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#87346) next »