Reply to foreach loop changed after 4.3 -> 4.4 upgrade

Your name:

Reply:


Posted by Larry Brown on 08/23/05 04:28

I had a foreach loop working on an array as such:

$multiarray = array(array('person','person'),array('another','another'))

the array was put through

foreach($multiarray as $subArray){

do something with array

}

on each loop I would see $subArray= array([0] = 'person',[1] = 'person')
and then $subArray= array([0] = 'another',[1] = 'another')

In other cases person might have some other value in the [1] position.
(it is being used in a function to create a select statement).

After the upgrade from 4.3 to 4.4 though each iteration gives...

array([0] = array([0] = 'person', [1] = 'person'),[1] = 0) and
array([0] = array([0] = 'another', [1] = 'another'),[1] = 1)

I find it hard to believe that I must rewrite every foreach loop in my
application to adjust to this. After all everything I've read states
that the 4.4 release was just a bug and security fix release.

Has anyone seen this behaviour?

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация