Re: delete part of array

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



thanks Leif, not too many think like you :)
some people are on this list just because they think they are some genius in
php, then when someone with less experience asks for help they bitch and
basically tell you to find your own solution or read the manual, that is the
first place any REAL php coder would go for help FIRST, but it doesn't
always solve a problem thats why there is a thing called MAILING LIST. :)

cheers.

----- Original Message ----- 
From: "Leif Gregory" <php@xxxxxxxxxx>
To: <php-general@xxxxxxxxxxxxx>
Sent: Thursday, January 13, 2005 7:39 AM
Subject: Re:  delete part of array


> Hello Jochem,
>
> Wednesday, January 12, 2005, 8:08:09 PM, you wrote:
> JM> read the manual entry first (see below) - and understand what the
> JM> function actually does - never just assume because its giving you
> JM> the result you want now that it will always work the way you
> JM> expect.
>
> Don't be a 'tard... Just because someone doesn't explicitly state they
> didn't read the manual entry first don't assume they didn't because
> you know what they say about assume.
>
> So to make a troll happy, here's exactly what it does with one array
> given as an argument:
>
> "If only one array is given and the array is numerically indexed, the
> keys get reindexed in a continuous way."
>
> Wow... Oddly enough that sounds exactly like what he wanted, and hence
> my suggesting it to him.
>
> JM> you think???
>
> Now.. On to the part where the "I think" applies.. Since they do not
> give an example of a single array being used as an argument, I  had to
> rely on memory from when I needed to do that nearly four months ago.
>
> I know I used array_merge(), but I didn't remember if I had to assign
> it to a variable or not.
>
> JM> hit the manual: http://www.php.net/array_merge (thats 30 chars to
> JM> type in the addressbar of your favorite browser and then you'd be
> JM> sure)
>
> No duh.... and if you're using Firefox, you can even do something
> really weird like give the php.net website a keyword (oh, "php" seems
> to work nicely), and set your location to "http://www.php.net/%s"; and
> amazingly enough you can just type in "php array_merge" and
> automagically it takes you right there. That's only 15 chars... Much
> more efficient than your suggestion.
>
>
> JM> probably array_merge() will do what he wants but there maybe
> JM> side-effects that will bite him in the ass later on, same goes for
> JM> my (previous) suggestion of array_values() as it happens <blush>.
>
> His array is numerically indexed. It does exactly what he wants.
>
>
>
> Cheers,
> Leif Gregory
>
> -- 
> TB Lists Moderator (and fellow registered end-user)
> PCWize Editor  /  ICQ 216395  /  PGP Key ID 0x7CD4926F
> Web Site <http://www.PCWize.com>
>
> -- 
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux