Hello,
I've been learning HTML, CSS and PHP for about a month. So I am a newbie in these fields and have to ask, thanks in advance.
Question: How can I determine an element from an array, so that I can save the element eg in a variable in order to access the array contents later in the code with the help of the variables.
code
- $ navi_array = array ();
- $ navi_array ['home'] = "home.txt";
- $ navi_array ['help'] = "help.txt";
Now I want the variable $ navi_var to store the element 'home' as string:
code
- $ navi_var = "home";
so that I can later access the array using the variable:
code
- $ var_two = $ navi_array [$ navi_var]
thanks
iosman