0

如何将交流发电机设置到初始位置?

代码:

foreach($items as $item):
        foreach($sides as $side):
            echo alternator('Left', 'Right');
        endforeach;
        //I want the alternator to "restart" here and always start from the initial variable "Left" in this case
endforeach;
4

1 回答 1

1

注意:要对该函数使用多个单独的调用,只需调用不带参数的函数即可重新初始化。

foreach($items as $item):
        foreach($sides as $side):
            echo alternator('Left', 'Right');
        endforeach;
        alternator();
endforeach;
于 2014-12-05T16:18:07.083 回答