How can iterate with a while loop until array1 is empty.
So far based on several conditions I'm pushing elements from array1 to array2. But I want to iterate array1 until everything from array1 is in array2.
something like:
// or while everything from array1 is on array2
while(array1 is empty){
if(somecondition1)
array_push(array2,"Test");
unset(array1[$i]);
elseif(somecondition2)
array_push(array2,"Test");
unset(array1[$i]);
}
Any ideas will be appreciate it!