note 41159 added to function.strstr
| From: | schultzatwidescreendotch at rn2 dot php dot net | Date: | Thu, 01 Apr 2004 07:22:27 +0000 |
| Subject: | note 41159 added to function.strstr | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-67449@lists.php.net to get a copy of this message | ||
a nice way to decide wether a string starts with a certain prefix, one can use this condition...
$url = 'http://www.widescreen.ch';
$isUrl = ( strstr($url,'http://') == $url );
have fun!
Lars
----
Manual Page -- http://www.php.net/manual/en/function.strstr.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+41159
Delete -- http://master.php.net/manage/user-notes.php?action=delete+41159&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+41159&report=yes
Search -- http://master.php.net/manage/user-notes.php