How do i make a if statement which checks if the string contains a forward slash?
$string = \"Test/Test\"; if($string .......) { mysql_query(\"\"); }
if(strpos($string, '/') !== false) { // string contains / }
From the PHP manual of strstr:
Note: If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead.
Note:
If you only want to determine if a particular needle occurs within haystack, use the faster and less memory intensive function strpos() instead.