note 77155 added to function.strpos
| From: | WagnerChristian at osu1 dot php dot net | Date: | Fri, 17 Aug 2007 08:11:54 +0000 |
| Subject: | note 77155 added to function.strpos | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-129551@lists.php.net to get a copy of this message | ||
If you plan to use an integer as needle you need first to convert your integer into a String else
it's not going to work.
For exemple :
<?php
$id = 1;
$my_text = "hel124lo";
$first_position =strpos($my_text ,substr($id,0));
?>
There are for sure some another solutions to convert an integer into a string in php.
----
Server IP: 194.153.94.10
Probable Submitter: 80.83.50.163
----
Manual Page -- http://www.php.net/manual/en/function.strpos.php
Edit -- https://master.php.net/note/edit/77155
Del: integrated -- https://master.php.net/note/delete/77155/integrated
Del: useless -- https://master.php.net/note/delete/77155/useless
Del: bad code -- https://master.php.net/note/delete/77155/bad+code
Del: spam -- https://master.php.net/note/delete/77155/spam
Del: non-english -- https://master.php.net/note/delete/77155/non-english
Del: in docs -- https://master.php.net/note/delete/77155/in+docs
Del: other reasons-- https://master.php.net/note/delete/77155
Reject -- https://master.php.net/note/reject/77155
Search -- https://master.php.net/manage/user-notes.php