Re: if and like together?

From: Date: Mon, 27 Oct 2003 01:24:12 +0000
Subject: Re: if and like together?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-167663@lists.php.net to get a copy of this message
Tim Thorburn wrote:
Is there an IF LIKE statement in PHP? I've got a MySQL database setup with headings and text (think a news article site) - headings in one field, text in another. In some cases, I don't want the contents of the heading field to appear on the site - in these cases, the headings begin with 'noshow-'. So I'm thinking the easiest way to handle this is if there is something similar to the MySQL 'LIKE' command in PHP ... is there such a beast?
if(preg_match('/^noshow-/', $heading)){ //Don't show } -- The above message is encrypted with double rot13 encoding. Any unauthorized attempt to decrypt it will be prosecuted to the full extent of the law.

« previous php.general (#167663) next »