note 107136 rejected from function.preg-match by danbrown

From: Date: Tue, 10 Jan 2012 20:15:54 +0000
Subject: note 107136 rejected from function.preg-match by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-185549@lists.php.net to get a copy of this message
Note Submitter: xborg99 at hotmail dot com ---- I am trying to add the wildcard to my statement but everything I try it will not work. Below statement works. How do I perform a match using wildcards so if anything with jpg will return a match and /or any that returns a car* will return a match. <?php $image=mysql_result($result,$i,"image"); if (preg_match("/image/", "car.jpg")) echo "Match was found <br />"; else echo "Match was not found"; ?>

« previous php.notes (#185549) next »