arrays - PHP square brackets around braces -
arrays - PHP square brackets around braces -
i having problem array , json_encode. want
"invites": [{ "sent": 0, "accepted": 0 }],
but looks this
"shares": { "sent": 0, "installed": 0 },
currently code using looks this
'shares' => array( 'sent' => 0, 'installed' => 0 ),
does know how go changing this. matt
you have wrap (associative) array within one:
'shares' => array(array( 'sent' => 0, 'installed' => 0, ))
php arrays json
Comments
Post a Comment