Easiest (not best or fastest I'm sure) is Walk through the original
array ...
For(i=0,j=0; i < $array.count; i++)
{
//Look for your xyz123 (if its not there write to new array)
if array(i) != "xyz123"
{
$array2(j) = $array(i)
j++
}
} //End For Loop
//you'll now have a "new" array with all the values EXCEPT "xyz123"
I know syntax is not correct .... but you should get the idea of the
iteration
[EMAIL PROTECTED] wrote:
> Hi all,
> my problem is following:
>
> let's say there is an array with 10 elements.
> $array = array('$value1', '$value2', '$value3', '$value4', '$value5', '$value6',
>'$value7', '$value8', '$value9', '$value10');
> 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.
>
> Any idea?
>
> Afan Pasalic
--
Michael Kelley
[EMAIL PROTECTED]
Programmer/Systems Analyst I
New Mexico State University
Information and Communication Technologies
Work # (505)-646-1374
P.O. Box 30001
MSC: 3AT
Las Cruces, NM 88003
--
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]