douju1968
2016-03-24 10:11 阅读 28
已采纳

检查常量时如何检查键中的多个值? [关闭]

I've been trying to figure this out for long time and none of the SO articles I find on this work.

I have the following to work with in concept...

'dependency' => array('Value', '==', 'true'),
'dependency' => array('Value1', '==', 'true'),
'dependency' => array('Value2', '==', 'true'),
'dependency' => array('Value3', '==', 'true'),
'dependency' => array('Value4', '==', 'true'),

But, I need "Value" to contain Value1, Value2, Value3, and Value4.

Is there a way to do this?

I've tried so many things, so maybe I am just string this together wrong because I have tried...

array, array_merge, array_keys, array_push,

and several $variable methods, but nothing has worked.

Can somebody help and tell me what I am doing wrong?

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享

1条回答 默认 最新

  • 已采纳
    dtz30833 dtz30833 2016-03-24 10:15

    Put an array in your array like this:

    'dependency' => array(array("value1", "Value2", "Value3"), '==', 'true'),
    
    点赞 评论 复制链接分享

相关推荐