* Thus wrote Ney André de Mello Zunino ([EMAIL PROTECTED]): > Hello. > > I wonder why the following code is not accepted by the PHP interpreter > > $fooVar = mysql_fetch_assoc($result)["barColumn"];
Because that is not an acceptable way to assign a variable. > > 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? Because that is how php works. If you are having that much trouble being able to deal with its rules of coding syntax then I would suggest to go back to your other language and discontinue gripping about it. By comparing php to another language and observing that php is not capable of what the other one can do, does not make it a bug. If you so desire to have this capability in php, you should submit a feature request to the php-development team. And probably explain your reasoning more thoroughly than just 'It is logical to do so.' You might get a positive result back. Curt -- "I used to think I was indecisive, but now I'm not so sure." -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php