I have a function which adds strings to an array, but outside the function it didn't add the string to the array.
Example:
[PHP]function AddStringToArray($name,$string) {
$theArray[$name] = $string;
print "inside the function: ".$theArray[$name]."<p>";
}
AddStringToArray('abc','hello world!');
print "outside the function: ".$theArray['abc'];
{[/PHP]
The above will result:
inside the function: hello world!
outside the function: