Hi,
Yes, what Ashley said is correct. Also, if you want to avoid writing
$perm several times in the if, or if you have a lot of permissions you
can do:
if (in_array($perm, array(11, 22)))
And you can put in that array all the permissions you need to.
Regards,
Jonathan
On Fri, Dec 18, 2009 at
Thank you Ashley, it makes perfect sense. I don't know why I didn't just set
up some tests like Shiplu suggested!
I've rewritten all my code BACK to the correct way. (I thought it looked
cooler, oh well).
On Fri, Dec 18, 2009 at 10:47 AM, Ashley Sheridan
wrote:
> On Fri, 2009-12-18 at 10:21 -0
On Fri, 2009-12-18 at 10:21 -0800, Allen McCabe wrote:
> In a nutshell:
>
> Will this work?
>
> if ($perm == (11 || 12))
>
>
> Explanation:
>
> I am laying the groundwork for a photo viewing system with a private and
> public mode, and additionally if an admin is logged in, there is an
> addi
In a nutshell:
Will this work?
if ($perm == (11 || 12))
Explanation:
I am laying the groundwork for a photo viewing system with a private and
public mode, and additionally if an admin is logged in, there is an
additional level of permission. I came up with a number system to make it
easier (an
4 matches
Mail list logo