The return of mysql_fetch_assoc()

From: Date: Wed, 30 Jul 2003 05:36:18 +0000
Subject: The return of mysql_fetch_assoc()
Groups: php.general 
Request: Send a blank email to php-general+get-157485@lists.php.net to get a copy of this message
Hello. I wonder why the following code is not accepted by the PHP interpreter $fooVar = mysql_fetch_assoc($result)["barColumn"]; I am forced to create an intermediary variable for the array returned from mysql_fetch_assoc(), like this: $record = mysql_fetch_assoc($result); $fooVar = $record["barColumn"]; Why is that? It doesn't seem logical. Could it be a bug? Thank you, -- Ney André de Mello Zunino

« previous php.general (#157485) next »