checking a variable for a string
Posted: Sun Jan 04, 2004 11:34 am
alright people. all i want to do (if its possible) is to check if a string exists in a variable. for example i want to check, in an if statement, wherther the string '?h=' exists in the variable test.
Is this possible?!
cheers, chris.
[Edit: Added PHP tags for eyecandy. --JAM]
Code: Select all
$test = "hello.php?h=ttt";
if (?h= is in $test)
echo "yes";
else
echo "no"cheers, chris.
[Edit: Added PHP tags for eyecandy. --JAM]