note 64865 added to function.array-shift
| From: | haroon at fastcreators dot com | Date: | Sat, 22 Apr 2006 05:50:21 +0000 |
| Subject: | note 64865 added to function.array-shift | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-108992@lists.php.net to get a copy of this message | ||
you can also use shift_array to extract a sub-array from main array, like sometimes are getting
array of arrays.
say you have array A and array B in a parent array C then to extract A and B individually you can
perform action like
$takeAfromC = array_shift(C)
$takeBfromC = array_shift(C)
now you have contents of array A in "$takeAfromC" and contents of array B in
"$takeBfromC" and you can use it easily this method helped me a lot in writing scripts for
importing contact list from gmail, yahoo, AOL, hotmail and MSN contact lists to parse the cURL
results.....
----
Server IP: 66.163.161.117
Probable Submitter: 63.109.248.61 (proxied: 203.101.184.38)
----
X-Spam-Status: No, hits=3.1 required=5.0 tests=DATE_MISSING,FROM_NO_LOWER
autolearn=no version=2.64
----
Manual Page -- http://www.php.net/manual/en/function.array-shift.php
Edit -- http://master.php.net/note/edit/64865
Del: integrated -- http://master.php.net/note/delete/64865/integrated
Del: useless -- http://master.php.net/note/delete/64865/useless
Del: bad code -- http://master.php.net/note/delete/64865/bad+code
Del: spam -- http://master.php.net/note/delete/64865/spam
Del: non-english -- http://master.php.net/note/delete/64865/non-english
Del: in docs -- http://master.php.net/note/delete/64865/in+docs
Del: other reasons-- http://master.php.net/note/delete/64865
Reject -- http://master.php.net/note/reject/64865
Search -- http://master.php.net/manage/user-notes.php