|
Posted by ptdorf on 10/09/07 22:19
try this out:
//create php array
$arr = array('element_1', 'element_2');
//store eval code for that const
define('my_array', 'return ' . var_export($arr, 1) . ';');
//use the const array
$const = eval(my_array);
//show the const array
print_r(eval(my_array));
Navigation:
[Reply to this message]
|