note 8419 added to sscanf
| From: | shaun at phpboards dot com | Date: | Tue, 12 Sep 2000 08:26:46 +0000 |
| Subject: | note 8419 added to sscanf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-4754@lists.php.net to get a copy of this message | ||
It appears that sscanf() MUST be used in conjunction with list(), at least under 4.01. If I
don't use list(), sscanf() will not properly assign a value.
The following code from the usage example
$serial = sscanf("SN/2350001","SN/%d");
echo $serial;
result in the output "Array" instead of the desired result. But when I add in the list()
function,
list($serial) = sscanf("SN/2350001","SN/%d");
echo $serial;
the output is correct.
http://www.php.net/manual/function.sscanf.php