I have what is probably a very simple problem. I'm trying to get a function to return an array, and assign the returned value to another array.
I have a function check_register() which has a return value which is an array. Within the function I can iterate through the array fine, but when I have the line:
$check = check_register();
foreach ($check as $k => $v) {
...}
$check is not an array, and the code fails on the second line. The following code does work:
foreach(check_register() as $k => $v) {
...}
but I'd like to know the syntax for returning an array and assigning it another array - or if there is just an error in mycode?
Thanks, njm
XP Pro, PHP 4.3.1 (ISAPI) on Apache 2.0.44