How to return array with these results in php
points
total 25779
HTML 1793
CSS 2666
Design 216
C# 0
Databases 0
$minhaarray [] = array(
"points"=>$event->total,
"name"=>$category->name,
);
echo minhaarray ;
result obitido
[{"points":"387","name":null},{"points":"1","name":null},
{"points":"289","name":null},{"points":"1","name":null},
{"points":"68","name":null},{"points":"290","name":null},
{"points":"0","name":null},{"points":"116","name":null}]
I need this result
points :
nome: 6548
nome2:65774
nome3:78587
assim por diante
igual a este resultado desta pagina https://teamtreehouse.com/ethanneff.json