For loop operation Array

Source: Internet
Author: User

1          if(!Empty($data)){2             $arr _length=Count($data);//the step size of the array3             $array _keys_list=array_values($data);//the key value of the array4              for($i= 7;$i<$arr _length;$i++){5                 $array _keys_list_new[]=$array _keys_list[$i];6}//dump ($array _keys_list_new);7             $have _authority_list=$this->have_authority ($data[' PID ']);8             9             foreach($have _authority_list[' List '] as $key=$val){Ten                 $new _id_arr[]=$val[' ID ']; One}//dump ($new _id_arr);d ie; A             $flag= 1;  -             foreach($array _keys_list_new  as $va){   -                 if(In_array($va,$new _id_arr)){   the                     Continue;  -}Else{   -                     $flag= 0;  -                      Break;  +                 }   -}//dump ($data);d UMP ($new _id_arr); +             if(!$flag){   A                $this->error (' Illegal operation ');  at}//dump ($flag); -             if($array _keys_list_new){ -                 $auth _str=implode(‘,‘,$array _keys_list_new);  -}//dump ($array _keys_list_new); -             $data[' Auth_str ']=$auth _str; -             //dump ($data);d ie; in             $rs=DD (' User.adminuser ')->account_add_child_do ($data);  -}//dump ($rs);d ie;

For loop operation Array

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.