Keyword break code optimization snippet

Source: Internet
Author: User
Keyword: break code optimization snippet & nbsp; $ dataarray (); Loop page foreach ($ config_content [pages] as $ page_type_key & gt; $ page_type_val) {if ($ page_type_val [page_type keyword break code optimization fragment

$ 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 ($ _ POST as $ 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 }}

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.