Re: escaping ' when inside a " "

From: Date: Tue, 18 Nov 2003 15:01:50 +0000
Subject: Re: escaping ' when inside a " "
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-170106@lists.php.net to get a copy of this message
Curt Zirzow wrote:
Don't you want to do: $sql = "select subject from subwhile where subject LIKE '%$var[0]%'";
I think more precisely: $sql = "select subject from subwhile where subject LIKE '%{$var[0]}%'";
Either will work, as will $sql = "... subject LIKE '%$var[string_index]%'";

« previous php.general (#170106) next »