Foreach loop inside array

后端 未结 3 1555
灰色年华
灰色年华 2020-11-27 06:02

I\'m trying to create an array inside an array, using a for loop - here\'s my code:

    array(
    \'label\' => \'Assign to user\',
    \'desc\' => \'C         


        
3条回答
  •  悲&欢浪女
    2020-11-27 06:29

    You cannot use the foreach in the definition of the array. You can however put the $clients variable in the array itself or you can foreach outside the array to build the array to be inserted at the options key

提交回复
热议问题