Thread: inStr Function
View Single Post
Old 05-12-2006, 07:53 PM   PM User | #6
lavinpj1
Regular Coder

 
Join Date: Sep 2005
Posts: 394
Thanks: 1
Thanked 0 Times in 0 Posts
lavinpj1 is an unknown quantity at this point
Seems rather silly to me. StrPos is very very very fast. Think if you have 100,000 characters. StrPos would take a matter of seconds, your function would take a lot longer.

Code:
if(strpos("The best site ever is CodingForums", "CodingForums")) 
{ 
  echo "CodingForums is in this string"; 
}
lavinpj1 is offline   Reply With Quote