You are here: Re: Safe to delete elements of array in foreach « PHP Programming Language « IT news, forums, messages
Re: Safe to delete elements of array in foreach

Posted by ZeldorBlat on 05/30/07 13:58

On May 29, 9:37 pm, "kamal kothandaraman"
<kkothandara...@uolyahoo.org> wrote:
> Is it safe to remove elements from an array that foreach is working on?
> (normally this is not the case but not sure in php) If so is there an
> efficient way to handle it? (I could add the indexes to a temp array and
> delete afterwards if necessary but since I'm actually working in a nested
> situation this could get a little messy. I guess I could set there values to
>
> regards,
> K. Kothandaraman

There was a very long thread about this not too long ago:

<http://groups.google.com/group/comp.lang.php/browse_frm/thread/
32287d3d8b815c33/b6841ec774f894f9>

 

Navigation:

[Reply to this 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

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