search

Home  >  Q&A  >  body text

wrong

{:isset($role['rights']) && $role['rights'] && in_array($vo.mid,$role['rights'])?'checked':''}

错误提示:

in_array() expects parameter 2 to be array, string given



Debug客栈Debug客栈2292 days ago1416

reply all(2)I'll reply

  • The Count of Monte Cristo

    The Count of Monte Cristo2019-03-04 17:20:00

    Is it a problem with cvo or json_decode

    reply
    0
  • 劳动者是第一生产力@鑫鑫@

    劳动者是第一生产力@鑫鑫@2018-11-02 16:10:39

    var_dump($role['rights']) Check whether it is a string or array type

    reply
    0
  • Debug客栈

    Thank you, solved

    Debug客栈 · 2018-11-02 17:14:54
    Debug客栈

    It's because I'm too sloppy

    Debug客栈 · 2018-11-02 17:15:02
  • Cancelreply