当前位置: 动力学知识库 > 问答 > 编程问答 >

php - Array in Array with "OR" Criteria

问题描述:

I'm generating a userlist from Wordpress and I want to display users which have the role subscriber or editor:

$args = array(

'role' => array('subscriber','editor'),

'meta_key' => 'last_name',

'orderby' => 'meta_value',

'order' => 'ASC',

);

So with that code, the user must have both roles subscriber and editor. What do I need to change so that the role is an "OR" criteria?

分享给朋友:
您可能感兴趣的文章:
随机阅读: