I have a string: $ext_allowed = "RTF|DOC|ZIP|PDF|JPG|GIF|XLS|PPT|PPS";
$extension="exe";
How can I check if $extension does not exists in $ext_allowed? Not case sensitive of course...
This should do it for you.
noods...
<?php $ext_allowed = "RTF|DOC|ZIP|PDF|JPG|GIF|XLS|PPT|PPS"; $extension="rtf"; if (!strstr(strtolower($ext_allowed),strtolower($extension))){ echo "string not found"; } else { echo "string found"; } ?>