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 ^ Quote 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 Quote Link to comment https://forums.phpfreaks.com/topic/228367-if-with-wildcard/#findComment-1177524 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.