nice one!

"Hugh Bothwell" <[EMAIL PROTECTED]> wrote in message
[EMAIL PROTECTED]">news:[EMAIL PROTECTED]...
> > <[EMAIL PROTECTED]> wrote in message
> > 011401c11958$26d38f60$[EMAIL PROTECTED]">news:011401c11958$26d38f60$[EMAIL PROTECTED]...
>
> > let's say there is an array with 10 elements.
> > One of elements has value 'xyz123' - I do not know which one.
> > How can I extract this element from the array and
> > have a new array with all other element, except extracted one.
>
> // original array
> $arr = array("a", "b", "c", "d", "xyz123", "f", "g");
> // list of values to remove
> $remove = array("xyz123");
>
> // do it
> $result = array_diff($arr, $remove);
>
> // show results
> foreach($result as $val)
>     echo "<br>$val";
>
>
>



-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to