Page 1 of 1

string function

Posted: Fri Jun 15, 2007 3:55 am
by itsmani1
Hi

i have two strings:

a="Hello its me here."
b="me"

now i want to check if b is in a or not?
now in this case b is in a
how can i check this?

thanks.

Posted: Fri Jun 15, 2007 4:05 am
by Oren

Posted: Fri Jun 15, 2007 4:26 am
by Gente

Code: Select all

<?php
$mystring = 'abc';
$findme   = 'a';
if (strpos($mystring, $findme) !== false)
{
  echo 'Yahoo';
}
?>