Forum Moderators: coopster
So if I put the above code in a webpage and run it, I would get an empty screen.
I know if strpos() can't find what I specify, it returns a boolean FALSE. So the substr() will be trying to execute a FALSE variable and thus makes itself FALSE as well and not return anything? Is that how substr() above will interpret this?
Thanks.
You can check if strpos returns false:
if(strpos("The", "c") === false) echo "Returns false";
else "Doesn't return false"; (=== is comparison with datatype)
you can learn more about substr on [php.net...]
Hope it helps
Michal Cibor