I’m creating an array that needs to hold some empty values like this:
$my_array['message'] = 'hello there';
$my_array['sender'] = 'Billy Bob';
$my_array['comment'] = '';
var_dump($my_array);
The result of var dump is:
array
'message' => 'hello there';
'sender' => 'Billy Bob';
I want the result to look like this:
array
'message' => 'hello there';
'sender' => 'Billy Bob';
'comment' => '';
Is it possible?
Yes, you can do that.
Here’s a link to an example: http://codepad.org/LyPteVX6