Hi,
Let's say I have two arrays
$fruit=array("apple, "orange", "kiwi", "carrot", "cabbage");
$bad_fruit=array("carrot", "cabbage");
Can any of you suggest an algorithm or a library function that would extract elements of $bad_fruit from $fruit and place what's left in $fruit into a new array, so that new array contains all the elements of $fruit without $bad_fruit.
In other words
After algorithm is finished it outputs array $new_fruit that contains only ("apple", "orange", "kiwi").
Thanks for your help,
Di
P.S. Is there any way to write this algorithm using recursive function?