> -----Original Message-----
> From: Decapode Azur [mailto:[EMAIL PROTECTED]
> Sent: 20 August 2003 23:54
>
> > If you unset an array that isn't associative, will that
ALL PHP arrays are associative. It's just that some arrays have only numeric keys.
> mean there will
> > be a gap in the numbers?
> [snip]----------8<-------------------
>
> > I'm compelled to ask *why* you want that result. In most
> cases it makes
> > no difference to your coding, so the only real reason I can see is a
> > somewhat obsessive desire for neatness!
>
> Perhaps there is a better way to grab the good points to
> build the faces,
> but I did not find another solution yet.
> If you know about another better issue to resolve this
> problem, please let
> me know about it.
Well, I can't really help here without seeing some relevant code. You may be right,
and what you are doing does require no gaps in your keys -- but it may be that you can
program round that more efficently than you can re-index the array when you delete a
value.
That said, I'd answer your original question with:
array_splice($arr, $n, 1);
which should actually be pretty efficient!
Cheers!
Mike
---------------------------------------------------------------------
Mike Ford, Electronic Information Services Adviser,
Learning Support Services, Learning & Information Services,
JG125, James Graham Building, Leeds Metropolitan University,
Beckett Park, LEEDS, LS6 3QS, United Kingdom
Email: [EMAIL PROTECTED]
Tel: +44 113 283 2600 extn 4730 Fax: +44 113 283 3211
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php