PHP Like thing similar to MySQL Like, for if statement?

if ($something is like %$somethingother%)

Is it possible?

no.

I don’t want to change the MySQL command, it’s a long page with many stuff on it

Use some good editor, that supports regular expressions in find & replace, and turn it to something like:

if(stripos($something, $somethingother) !== FALSE){

}

Leave a Comment