Re: difference !!??

From: Date: Thu, 07 Feb 2002 14:15:08 +0000
Subject: Re: difference !!??
References: 1  Groups: php.db php.general 
Request: Send a blank email to php-general+get-83831@lists.php.net to get a copy of this message
Bart, See this page for an explanation of quotes inside array brackets: http://www.php.net/manual/en/language.types.array.php Basically, the correct way to do it is to _always_ use quotes (single quotes for strings without variables, and double quotes for strings with variables). So your example below should use format #2 since there are no variables to expand. Format #1 below is deprecated, and I can attest to weird behavior when you use $row[$column_name] without double quotes. Hope this helps! Daniel Ems On Thu, 7 Feb 2002, B. Verbeek wrote: > Hello, > > What's the difference between: > > 1.- $row[column_name]; > 2.- $row['column_name']; > 3.- $row["column_name"]; > > ? > > ragards Bart >

« previous php.general (#83831) next »