solved Using AND/OR in if else for Quota IDs

alt=
Ekwe
@ekwe
10 years ago
212 posts
{if $item.profile_quota_id == 5&&6}
Code
{/if}

or

{if $item.profile_quota_id == 5||6}
Code
{/if}

which one is correct? trying to show some areas based on Quotas
updated by @ekwe: 10/08/14 12:23:37AM
douglas
@douglas
10 years ago
2,790 posts
It would be more like this...

{if $item.profile_quota_id == '5' || $item.profile_quota_id == '6'}

and its better to use the OR method here because most likely, the $item.profile_quota_id variable will never be multiple quota ID's.

Hope this helps!


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos
alt=
Ekwe
@ekwe
10 years ago
212 posts
true, thanks mate
douglas
@douglas
10 years ago
2,790 posts
Your welcome! :)


--

Douglas Hackney
Jamroom Team - Designer/Developer/Support
FAQ-Docs-Help Videos

Tags