The array exists and has 13 elements but not when passed...
Posted: Tue Nov 15, 2005 4:37 pm
I'm passing an array to a function (or I want to). I'm trying to avoid using in the function.
Here's the function call:
echos
but inside the function echos
The function so far is:
Why has the array no elements inside the function?
Incase it matters the array elements are not numbered, they are named, ie
Thanks.
Code: Select all
global ...Here's the function call:
Code: Select all
loginForm($currentLoginText, $self);Code: Select all
echo "currentLoginText length: " . count($currentLoginText) . "<br>";Code: Select all
currentLoginText length: 13Code: Select all
echo "textArray length: " . count($textArray) . "<br>";Code: Select all
textArray length: 0Code: Select all
function loginForm($textArray, $actionValue)
{
echo "textArray length: " . count($textArray) . "<br>";
// Start displaying form... rest of function
}Incase it matters the array elements are not numbered, they are named, ie
Code: Select all
$currentLoginText['loginMessage']