i have these arrays:

$A_fruit_list = array('A1' => 'Fruit A1',
                      'A2' => 'Fruit A2',

$B_fruit_list = array('B1' => 'Fruit B1',
                      'B2' => 'Fruit B2',

then i do these:

$var = "B";
$var_list = $var."_fruit_list";

//Note: variable variable below
$fruit_array_of_choice = ${$var_list};
$FRUIT_code => array_keys($fruit_array),
$FRUIT_name => array_values($fruit_array),

which generates these warnings:
Warning: First argument to array_keys() should be an array in
/home/httpd/vhost/home/fruits.php on line 14

Warning: Argument to array_values() should be an array in
/home/httpd/vhost/home/ureg/fruits.php on line 15

how do i script around that ?


Do You Yahoo!?
HotJobs - Search Thousands of New Jobs

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to