簡體   English   中英

PHP-是否可以在其他頁面內繼續foreach?

[英]PHP - Is it possible to continue foreach inside other page?

IIs可以做這樣的事情:

foreach ($var as $val){

//code here

//code to continue

}

並在其他函數中再次調用foreach:

foreach ($var as $val){

//code to continue

//loop continuation

}

您可以根據需要多次調用foreach 您只需要以某種方式將此數組/對象傳遞給其他函數。 每次調用foreach它都會從頭開始迭代。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM