Hello.
Here is simple question with probably a simple answer. Forgive me for asking and not trying it on my own, but I'd rather not mess up what I have going!!
Are arrays declared outside a function, available in functions? Or do you have to pass in the Array like u do a variable? I'm trying to get in the habit of using the same code in a function to avoid having duplicate code.
Example:
$array[1] = "rahh";
$array[2] = "rahh";
function test() {
echo $array[1];
echo $array[2];
}
Will this work? Thanks.