![]() |
conditional query
PHP Code:
|
conditional of what ? what do you want with that code ?
and why do you have to place '\' in eval() ?? and is "in_array($grps_showgroup['groupid'], $grps_ids['0'])" correct ?? |
the conditional is if the moderate_members column has a value and the user doesn't have the groupid in his/her groups arrray column in the user table then it will show the template, the reason i've got the characters escaped is because i'm using quotation marks and not apostraphies. and the in_array is the groupdid first and the array it's looking in second. it's not spouting now errors so it should be right i hope so, the reason i'm asking is because it's not working, so i'm wonderinf if it's something like 'you can't use in_array like that in a conditional'
|
i think your problem is some where at the end :
, $grps_ids['0'] what does it mean ? dunno if i understod you right but its might need to be : AND $grps_ids['0'] !=false or whatever... |
The syntax is...
in_array(needle, haystack) or in_array( single_element_variable, Array() ) Are you comparing two arrays? That won't work. If not, are the array and the single element variable on the correct sides of the function? |
it should've been if($grps_showgroup['private_posts'] AND !in_array($grps_showgroup['groupid'], $grps_ids))
the first part of the conditional was wrong, i was checking the wrong column |
why are you all wrong in this: in_array($grps_showgroup['groupid'], $grps_ids['0'] ?
the second param must be an array mate which $grps_ids['0'] is NOT. |
Quote:
the $grps_ids['0'] was left over from debugging the values. |
All times are GMT. The time now is 09:24 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|