note 11230 modified in function.list by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 22:04:24 +0000 |
| Subject: | note 11230 modified in function.list by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25506@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:
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.
--was--
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