Re: [PHP] Newbie - is there a function similar to the sql 'like' comparison operator?

[email protected] ("Kalle Sommer Nielsen")
Newsgroups php.general
Message-ID <D3E6374A6C8D4EC09187CA9FEB07D995@KALLESAWESOMEPC>
Hi RevDave

Theres the similar_text() function which calculates the procentage of te 
similarity between
two strings.

If your looking for a check to see if a string has some specified text then 
use the strpos()
function and then the identical comparison operator to check for true and 
false


Kalle Sommer Nielsen
DR - www.dr.dk

----- Original Message ----- 
From: "revDAVE" <[email protected]>
To: "PHP General" <[email protected]>
Sent: Thursday, May 08, 2008 5:20 PM
Subject: [PHP] Newbie - is there a function similar to the sql 'like' 
comparison operator?


> 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 know of this page:
>
> http://us3.php.net/manual/sl/language.operators.comparison.php
>
>
> But I don't see something 'like' or 'similar' to something else
>
>
> --
> Thanks - RevDave
> Cool @ hosting4days . com
> [db-lists]
>
>
>
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
>
>
> -- 
> No virus found in this incoming message.
> Checked by AVG.
> Version: 7.5.524 / Virus Database: 269.23.10/1421 - Release Date: 
> 07-05-2008 17:23
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.