I have created a custom form in form field following code is there.
$form['display_result'] = array(
'#title' => 'Result' ,
'#type' => 'textarea',
'#value' => !empty($dval) ? $dval : null,
'#default values' => '',
)
Problem is $dval is array which includes following code:
stdClass Object
(
[to] => Tove
[from] => Jani
[heading] => Reminder
[body] => Don't forget me this weekend!
)
I am getting following warning:
Warning: htmlspecialchars() expects parameter 1 to be string, object given in check_plain() (line 1571 of /var/www/html/D7/includes/bootstrap.inc)