simple delete from array?

From: Westcoast Sheri (sheri_deb88_at_nospamun8nospam.com)
Date: 07/31/04


Date: Sat, 31 Jul 2004 04:44:31 GMT

Any way to do a simple delete from array?

In other words, what would be the *easiest* (and fastest php runtime)
way to delete "banana" from the following array:

$my_array = array(
"apple",
"banana",
"grape",
"lime"
);

....so that $my_array will now be:

$my_array = array(
"apple",
"grape",
"lime"
);



Relevant Pages

  • Re: Cant send message
    ... all array keys should be quoted unless you're passing ... Array references inside double quotes behave differently. ... echo "A banana is."; ...
    (comp.lang.php)
  • problems marshaling arbitrary sized arrays of structs
    ... Banana** bananas); ... Only the first item gets copied, the rest of the items in bananas array ... I assume my IDL declaration is wrong, ... p.s. - just for testing I tried to change the Banana to a DWORD, ...
    (microsoft.public.vc.atl)
  • Re: Access times of an array
    ... global variables into an array, ... global Banana ...
    (comp.lang.tcl)
  • Array from row in worksheet
    ... This copies the worksheets Apple, Banana and Orange to a new workbook. ... What I am trying to do is dynamically populate the array. ...
    (microsoft.public.excel.programming)
  • Re: retrieve current index while looping an array
    ... I thought that when you give indexes to an array they would remain unvaried. ... probably this is true only with string indexes. ... How would you find the 'index' of banana now? ... alert('Property name for banana is ' + idx); ...
    (comp.lang.javascript)