php check if string is url or path code example
Example: php check if string contains url
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);
preg_match('/(http|ftp|mailto)/', $string, $matches);
var_dump($matches);