| 
 Posted by Ray Paseur on 11/24/05 15:05 
strpos will probably be faster than ereg.  It's the easier solution if you  
know the exact content of the substring you're looking for.  But if you only  
know the general pattern of the substring, then you need to fall back on  
ereg or eregi. Google "REGEX" and you'll find some helpful resources for  
dealing with regular expressions. ~Ray 
 
"Oli Filth" <catch@olifilth.co.uk> wrote in message  
news:1132759946.099296.177290@f14g2000cwb.googlegroups.com... 
> 
> Harry wrote: 
>> > strpos() 
>> 
>> I've been flicking through the documentation ad it seems that strpos() 
>> only tells you if a string contains an only CHARACTER. Am I right?? :S 
>> 
> 
>>From the manual: 
> "strpos --  Find position of first occurrence of a string" 
> 
>  strpos("hendogpenguin", "dog") 
> 
> will return 3. 
> 
>  strpos("hendogpenguin", "minotaur") 
> 
> will return FALSE. 
> 
> --  
> Oli 
>
 
  
Navigation:
[Reply to this message] 
 |