10-04-2009, 04:34 PM
|
#3 (permalink)
|
|
The Addict
Join Date: May 2009
Posts: 287
Thanks: 5
|
Quote:
Originally Posted by benton
Given something like
PHP Code:
$check = mysql_query("select a from table");
$item = mysql_fetch_array($check);
echo $item['a'];
Is it poosible to combine the last two statements? Something like
PHP Code:
echo (mysql_fetch_array($check)['a']);
|
That condenced line will throw an error.
PHP Code:
$check = mysql_fetch_array(mysql_query("select a from table"));;
echo $check['a'];
That will still throw an error. It does for me at least.
|
|
|
|