Thread: Search string
View Single Post
  #4 (permalink)  
Old June 1st, 2005, 05:21 AM
Mantis Mantis is offline
Friend of Wrox
 
Join Date: Dec 2004
Location: London, London, United Kingdom.
Posts: 154
Thanks: 0
Thanked 0 Times in 0 Posts
Default

A quicky .. I think there's a bug in PHP using strpos() - if anyone wants to check it and post it to Mr PHP

if your string="BlackBerry3270/5.3.1" and you do:
if(strpos(string, "BlackBerry") == true) { echo "Blackberry web browser detected"; }
That doesn't work.. However if you do:
if(strpos(string, "lackBerry") == true) { echo "Blackberry web browser detected"; }
That work fine.. so officialy strpos() isn't checking the 1st caracter...
Reply With Quote