- var_dump: documentation ( source)
- array_merge: documentation ( source)
<?php
$where = array(
'user.is_removed' => 0,
'activation_code IS NULL' => NULL);
if( true ) {
$where = array_merge($where, array(
'(user_role.role_id != 1 OR user_role.role_id IS NULL) AND (user_role.parent_role_id != 1 OR user_role.parent_role_id IS NULL)' => NULL
));
}
// Members should not be able to PM to observers as well
if (true) {
$where = array_merge($where, array(
'(user_role.role_id != 3 OR user_role.parent_role_id != 3)' => null
));
}
var_dump($where);