LMPX.COM |
Home | Linux | Mysql | PHP | XML | ||
|
|
|||
From: Colin Guthrie Date: Fri May 9 02:56:48 2008 Subject: Re: Newbie - is there a function similar to the sql 'like' comparison
operator?
revDAVE wrote: > Newbie - is there a function similar to the sql 'like' comparison operator? > > I would like to be able to compare 2 strings: > > If $this ---*like or similar to*--- $that > > That type of thing... I strongly suggest you read up on regular expressions: http://uk.php.net/manual/en/book.regex.php Knowing how to use regular expressions is a a very handy skill. I do a lot of mass changing of files via the command line with tools such as grep, sed and awk and a mastery regular expressions can save hours of laborious typing and find/replacing ;) Reminds me of one of my favourite xkcd cartoons: http://xkcd.com/208/ Col
| Navigate in group php.general at sever news.php.net | |
| Previous | Next |
| © No Copyright You are free to use Anything |
Site Maintained by PHP Developer
Powered By PHP Consultants |