note 11230 added to list
| From: | gherson at php2 dot chek dot com | Date: | Sun, 11 Feb 2001 20:17:37 +0000 |
| Subject: | note 11230 added to list | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-10908@lists.php.net to get a copy of this message | ||
list() doesn't seem to work with a single-itemed array. implode() provides a workaround.
Example:<br>
<pre>list($cnt) = sqlUsrOp("select cnt from ledger where hr=1234"); // $cnt is
empty.
// This works:
$cnt = sqlUsrOp("select cnt from ledger where hr=1234");
$cnt = implode("",$cnt);
echo $cnt; // Shows, eg, 1.
</pre>
http://www.php.net/manual/en/function.list.php