06-25-2009, 07:51 PM
|
#1 (permalink)
|
|
The Wanderer
Join Date: Jun 2009
Posts: 20
Thanks: 2
|
how to delete an element from an array without knowing its index position
dear friends..
Any one please help me to write a code to delete an element from an array where i don't know the index position of an element.and i wanted to use array_splice if possible.
example:
$x=array("a","b","c","d");
array_splice($a,2,1);//if i want to delete "b" from an array
print_r($x);
here i know about the position but if i don't know about the position of an element then how can i do?
thanks..
|
|
|
|