...

View Full Version : How to search for a particular string using preg_match



ramki067
11-25-2010, 11:01 AM
Hi,

I've a string "mpeg4" stored in $value as below, which needs to be searched in if statement. But the below if is not searching! What is wrong in this?

if(preg_match('mpeg4\d)/i',$value))
$value = "MPEG-4";


Please help.


Thanks,
Ramki

abduraooft
11-25-2010, 11:28 AM
Use the simple strpos() or strstr() instead.



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum