Re: Direct Access to an Array Item?

From: Date: Wed, 09 Aug 2006 23:33:15 +0000
Subject: Re: Direct Access to an Array Item?
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-42281@lists.php.net to get a copy of this message
Peter Beckman wrote: > if (($row = mysql_fetch_row($result))[3] == 'foo') { > $user = $row; > } > > or > > $bar = explode('#', $str)[2]; PHP does not currently support this type of syntax in any form. You must assign the return value of a function to a variable if you want to access it as an array. -Stut

« previous php.db (#42281) next »