Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.php > #8467
| Path | csiph.com!usenet.pasdenom.info!aioe.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail |
|---|---|
| From | "M. Strobel" <sorry_no_mail_here@nowhere.dee> |
| Newsgroups | comp.lang.php |
| Subject | Re: unset multidimensional array element |
| Date | Sun, 24 Feb 2013 14:40:32 +0100 |
| Lines | 29 |
| Message-ID | <aoujigFdhp1U1@mid.uni-berlin.de> (permalink) |
| References | <1de87c2e-dd81-475a-8516-85c0885dca9a@p5g2000yqj.googlegroups.com> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | news.uni-berlin.de e2nRTeCPpmU+9h+VjN0bVw+U1gQFptlHtGQ4/fF+rBxrZvR8yUZ0kH9DIhRKHViQ8= |
| User-Agent | Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130215 Thunderbird/17.0.3 |
| In-Reply-To | <1de87c2e-dd81-475a-8516-85c0885dca9a@p5g2000yqj.googlegroups.com> |
| Xref | csiph.com comp.lang.php:8467 |
Show key headers only | View raw
Am 24.02.2013 01:18, schrieb cate: > Is this correct? > > I remove an element from a multidee array. Numeric Indexing then > fails because the it's no longer 0, 1, 2 but instead 0, 2 after the > unset. It seems the a numeric index has graduated to a key. (I > think I read that's the way php works) > > Do I have to repack this to get sequential indexing to work or is > there a php way to remove elements and maintain a "numeric" indexs? > > I suppose I could make it a rule to use the construct foreach, but I > do so love for(;;). > > Thank you in advance. > > > array ( > array (1, 2, 3), > array (4, 5, 6), > array (7, 8, 9) > ) > This is the behaviour PHP programmers IMO like. Imagine you have a unique database key as index, I would not like it to be renumbered after deletion of one entry. /Str.
Back to comp.lang.php | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
unset multidimensional array element cate <catebekensail@yahoo.com> - 2013-02-23 16:18 -0800
Re: unset multidimensional array element Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-23 20:17 -0500
Re: unset multidimensional array element cate <catebekensail@yahoo.com> - 2013-02-23 17:19 -0800
Re: unset multidimensional array element Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-23 20:21 -0500
Re: unset multidimensional array element cate <catebekensail@yahoo.com> - 2013-02-23 17:24 -0800
Re: unset multidimensional array element Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-23 20:34 -0500
Re: unset multidimensional array element cate <catebekensail@yahoo.com> - 2013-02-23 17:40 -0800
Re: unset multidimensional array element "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-24 14:40 +0100
Re: unset multidimensional array element catebekensail@yahoo.com - 2013-02-24 07:36 -0800
Re: unset multidimensional array element "M. Strobel" <sorry_no_mail_here@nowhere.dee> - 2013-02-24 17:25 +0100
Re: unset multidimensional array element Captain Paralytic <paul_lautman@yahoo.com> - 2013-02-25 04:01 -0800
Re: unset multidimensional array element Jerry Stuckle <jstucklex@attglobal.net> - 2013-02-25 11:13 -0500
csiph-web