|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
[2007-05-18 14:50 UTC] tony2001@php.net
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Tue Dec 02 18:00:01 2025 UTC |
Description: ------------ I think your mast look code/ Sorry but my english is not good Reproduce code: --------------- <? $users=explode('.',".1.2.3.4."); foreach ($users as $key=>&$user){ if (empty($user)) unset($users[$key]); //it bag? $user=1; //not work } var_dump($users); //see result ?> Expected result: ---------------- array(6) { [1]=> &int(1) [2]=> &int(1) [3]=> &int(1) [4]=> &int(1) } Actual result: -------------- array(4) { [1]=> string(1) "1" [2]=> string(1) "2" [3]=> string(1) "3" [4]=> string(1) "4" }