I have an array on which I am iterating using for loop. The array has URL at each element that is needed to be passed as argument to a function.
When I call the function during iteration, loop stops after first iteration and does not proceed over entire array.
When I try to echo out only the value in array and does not call function in loop then it works fine.
This is the same issue if I use foreach loop. Please help.
Here is my code
echo '<ol>';
for($i=0; $i < count($watchList); $i++){
saveProduct(getProductDetail($watchList[$i]));
echo ' <li>Product Saved '. $watchList[$i] .'</li>';
}
echo '</ol>';
count($watchList)?saveProductorgetProductDetailmodify$watchListin any way?