Welcome Guest, Not a member yet? Register   Sign In
Foreach and redirect
#1

[eluser]Martin Overgaard[/eluser]
Hi,Can anyone please help me with the following? Thanks.

I ‘am trying to do this:

foreach ($items As $item):

redirect("/item_list/" . $item->id);

endforeach;

Meaning - that the function that there is redirected to has to be called for each record in $item. When I do this, it will only run for the first record in @item. I properly need some code that returns back to the right place in the foreach loop in this function from the one that I have been redirected to, or is redirect in a “foreach” not the way, or?


Many thanks in advance

Best regards
Martin




Theme © iAndrew 2016 - Forum software by © MyBB