violinrocker Posted February 21, 2011 Share Posted February 21, 2011 <?php $title="juni/ngats.co.nr/hehe"; if ($title==([^/\.]+)/ngats.([^/\.]+).nr/([^/\.]+)) { echo it works; } whats wrong here? is it the wildcard? what do i need to do? it says it has errors with [... and then if i remove [] it will point out an error on ^ Link to comment https://forums.phpfreaks.com/topic/228367-if-with-wildcard/ Share on other sites More sharing options...
johnny86 Posted February 21, 2011 Share Posted February 21, 2011 You have to use PHPs preg_match function: http://php.net/preg_match Link to comment https://forums.phpfreaks.com/topic/228367-if-with-wildcard/#findComment-1177524 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.