Hi folks
I think I am being dumb but I just can't figure out a way to do this:
I have a static array inside a function, and I want caller to be able to
set/get values in the array.
Something like this:
<?php
data_store( "set", "my_array['key1']['key2']", "my new value")
function data_store( $action, $variable, $value )
{
static my_array = array( ) ;
if( $action == "set" )
{
// set my new value
}
}
?>
I have been mucking about with eval( ) and with variable variables, but
can't get it to work.
Can some kind person point out what I am missing??
Thanks
Geoff Caplan
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]