note 85953 added to control-structures.foreach

From: Date: Fri, 26 Sep 2008 01:51:18 +0000
Subject: note 85953 added to control-structures.foreach
Groups: php.notes 
Request: Send a blank email to php-notes+get-144725@lists.php.net to get a copy of this message
It should be noted that when using foreach to pass an array's key ($key => $value), the key must be a string and not binary content - containing 0's, f.e., as was my case when i used foreach to parse bencoded data handed back to me from a bittorrent tracker scraping - as this will throw foreach off and hand you a key that is binary different than the actual content of the array. ---- Server IP: 80.67.2.2 Probable Submitter: 83.227.160.33 ---- Manual Page -- http://www.php.net/manual/en/control-structures.foreach.php Edit -- https://master.php.net/note/edit/85953 Del: integrated -- https://master.php.net/note/delete/85953/integrated Del: useless -- https://master.php.net/note/delete/85953/useless Del: bad code -- https://master.php.net/note/delete/85953/bad+code Del: spam -- https://master.php.net/note/delete/85953/spam Del: non-english -- https://master.php.net/note/delete/85953/non-english Del: in docs -- https://master.php.net/note/delete/85953/in+docs Del: other reasons-- https://master.php.net/note/delete/85953 Reject -- https://master.php.net/note/reject/85953 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#144725) next »