$row['test']='this is test index';
$test="$row['test']";
echo $test;
in the above code in variable test I want to store name of the varible $row['test'] and then try to print test. The desired output should be 'this is test index' but the output I am getting is Parse error: syntax error, unexpected '' (T_ENCAPSED_AND_WHITESPACE), expecting '-' or identifier (T_STRING) or variable (T_VARIABLE) or number (T_NUM_STRING) . So my question is how can I actually get the value of variable $row['test'] stored in the variable test as string.