sastro Posted November 19, 2010 Share Posted November 19, 2010 here the script <?php $a='dir/5_cat/big-dog.html dir/0_cat/wild-dog.html dir/1_cat/expensive-dog.html dir/3_cat/expensive-cat.html'; $b='dir/1_cat/expensive-dog.html'; $th=str_replace(array('.','/'),array('\.','\/'),$b); if(preg_match('/'.$th.'/',$a)){ echo 'found'; }else{ echo 'not found'; } ?> It works if $b='dir/1_cat/expensive-dog.html'; but result still found with $b='dir/1_cat/expensive-dog.htm'; Please help Quote Link to comment Share on other sites More sharing options...
sastro Posted November 19, 2010 Author Share Posted November 19, 2010 Wrong question... Sory, it my false. Quote Link to comment 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.