when i use this code
$a=array ( 'Q1' => 'gravity', 'Q2' => 'm*a',);
print_r($a); output will be array
$a is an array
suppose array ( 'Q1' => 'gravity', 'Q2' => 'm*a', ) is stored in a table column
when retrieved this column values and stored in a variable then that variable is not an array
"array ( 'Q1' => 'gravity', 'Q2' => 'm*a', )"is a string. Have a look at serialize() : you can store an array as a string, and then unserialize this string to retrieve your array.serialize()