: This article mainly introduces the keyword break code optimization snippet. if you are interested in the PHP Tutorial, you can refer to it.
$ Data = array (); // Loop page foreach ($ config_content ['Page'] as $ page_type_key => $ page_type_val) {if ($ page_type_val ['page _ type'] = $ page_type) {// Loop module foreach ($ config_content ['Pages '] [$ page_type_key] ['blocks'] as $ block_type_key => $ block_type_val) {if ($ block_type_val ['blocktype'] = $ blocktype ){
Foreach ($ _ POSTas $ key => $ val) {if (is_string ($ val) {$ data [$ key] = trim ($ val );} else {$ data [$ key] = $ val ;}} $ config_content ['Pages '] [$ page_type_key] ['blocks'] [$ block_type_key] ['Settings'] = $ data;
Break; // code optimization, jump out of the foreach loop} break; // code optimization, jump out of the outer foreach loop }}
The above describes the keyword break code optimization snippets, including the content, and hope to be helpful to friends who are interested in PHP tutorials.