473,385 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Array with Statements

91
What would be the proper way to set up an array of links based on access levels?

Expand|Select|Wrap|Line Numbers
  1.     $adminlinks = array(
  2.         "User" => "/admin/users",
  3.         $func->iif($func->hasAccess(AL_EDIT_CONFIG),"Config" => "/admin/config",""),
  4.         "Template" => "/admin/template");
  5.  
Mar 27 '08 #1
4 1113
aktar
105 100+
I wouldn't do it much differently. What you've dont seems good to me
Mar 29 '08 #2
arggg
91
well with the iif statement it doesnt like the => or anything not in " "
Mar 31 '08 #3
Markus
6,050 Expert 4TB
well with the iif statement it doesnt like the => or anything not in " "
What would you be checking for in the IF statement?
Mar 31 '08 #4
arggg
91
What would you be checking for in the IF statement?
The $func->iif checks if they are supposed to have access to that feature.
Mar 31 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Dana | last post by:
I have a form with a couple of dropdown fields. the dropdown fields get the value from one table which is a reference table. The table consists of 3 columns - type, id, name. An example would...
22
by: nobody | last post by:
hello everybody, is there a way of creating an array with help of a function that would accept the name of this array as a parameter and then create global Array type variable of that name? so...
6
by: Treetop | last post by:
I get the following error in IE but not in Netscape. The code works, and the error only shows up if you click on the icon in the bottom left corner of the screen, next to where it says Error on...
38
by: VK | last post by:
Hello, In my object I have getDirectory() method which returns 2-dimentional array (or an imitation of 2-dimentional array using two JavaScript objects with auto-handled length property - please...
104
by: Leszek | last post by:
Hi. Is it possible in javascript to operate on an array without knowing how mamy elements it has? What i want to do is sending an array to a script, and this script should add all values from...
20
by: John Mark Howell | last post by:
I had a customer call about some C# code they had put together that was handling some large arrays. The performance was rather poor. The C# code runs in about 22 seconds and the equivalent...
11
by: cdg | last post by:
Could anyone tell me how to write a loop for an array, that would have to check each iteration for duplications of previous entered values. So, the exact number of loops is not known, but the total...
8
by: lovecreatesbeauty | last post by:
Hello experts, I have seen following the code snippet given by Marc Boyer (with slight changes by me for a better format), and have doubts on it. I am so grateful if you can give me your kindly...
4
by: awilson161 | last post by:
Hi. I wonder if anyone can help me. I am using C++ and i have created an array of the size X*Y (array) where I later specify X and Y. The array is just 1s and 0s and I want to know if I can get to...
1
by: sandeepbaswa | last post by:
I want the code like this.. the "&&&&&" should be solved by you.. i mean the &&&&& should be replaced by the answer.... (in the method fun(), the formal parameter should be a pointer to the actual...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.