Right now I'm creating a string with the array() function in it, in order to eval() it to create the array I want at a later point in time. This is the code I'm using to create the string:
while(list($type, $checked)=each($new_html)) {
if ($checked=='on') $checked=1; else $checked=0;
if ($html!='array(') $html.=', ';
$html.="'$type'=>$checked";
}
$html.=');';
but when I do this:
$check_array=eval($html);
which is the same as doing this (under a specific form input):
$check_array=eval("array('biu'=>1, 'a'=>1, 'img'=>1, 'colors'=>1, 'quotes'=>1);");
it takes it, and when I go to use $check_array like the array it's supposed to be, it says that it isn't an array.
Help! What is going on with this?
--Mr. P