RES: RES: [PHP] string

2008-04-07 Thread Thiago Pojda
Never late to learn new stuff, you're right Stut. Thanks! -Mensagem original- De: Stut [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 7 de abril de 2008 10:42 Para: Thiago Pojda Cc: 'John Taylor-Johnston'; 'PHP-General' Assunto: Re: RES: [PHP] string Thi

Re: RES: [PHP] string

2008-04-07 Thread Stut
Thiago Pojda wrote: if (strpos($name,'John') > 0){ //you could use stripos for case insensitive search echo "found"; } ?> This will not do what you expect it to. Since 'John' is the first thing in the string strpos will return 0 causing the condition to evaluate to

RES: [PHP] string

2008-04-07 Thread Thiago Pojda
0){ //you could use stripos for case insensitive search echo "found"; } ?> -Mensagem original- De: John Taylor-Johnston [mailto:[EMAIL PROTECTED] Enviada em: segunda-feira, 7 de abril de 2008 10:25 Para: PHP-General Assunto: [PHP] string $name = "John Ta