$str = ‘abcdef’;
if(strpos($str, ‘a’))
{
echo “founct the letter ‘a'”;
}
else
{
echo “could not find the letter ‘a'”;
}
Let trace it, strpos return position of str in intergers and first letter will be at postion 0, so in ‘abcdef’ a is at postion zero and if condition consider it false, so
out will “could not find the letter a”.