如何使用php从assoc数组中获取值

   Array([0] => stdClass Object([max(Transaction_id)] => 10251))

My php sql query returns the answer in this format.
How can i display the only value from this format.
Thanks in advance

In your query add the as then the name of the column that you want to retreive.

SELECT MAX(COLUMNNAME) AS example example FROM TABLENAME

And then in your php file

echo $result[0]['example'];

if for some reasons you are unable to convert the sql query you can access to this variable in the following way

echo $obj->{"max(Transaction_id)"};