note 12395 modified in function.unpack by felipe
| From: | felipe@php.net | Date: | Wed, 23 Jul 2008 13:05:07 +0000 |
| Subject: | note 12395 modified in function.unpack by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-142601@lists.php.net to get a copy of this message | ||
If no key name is given [e.g., unpack('C*',$data)], the keys are simply integers starting
at 1, and you have a standard array. (I know of no way to get the array to start at zero.)
If you use multiple types, you must give a key name for all of them (except optionally one), because
the key counter is reset with each slash. For example, in unpack('n2/C*',$data), indices 1
and 2 of the returned array are filled by integers ('n'), then overwritten with characters
('C').
--was--
If no key name is given [e.g., unpack('C*',$data)], the keys are simply integers starting
at 1, and you have a standard array. (I know of no way to get the array to start at zero.)
<P>
If you use multiple types, you must give a key name for all of them (except optionally one), because
the key counter is reset with each slash. For example, in unpack('n2/C*',$data), indices 1
and 2 of the returned array are filled by integers ('n'), then overwritten with characters
('C').
http://php.net/manual/en/function.unpack.php