<?php
$c = count($rank); // 5
for ($i = 0; $i < $c; $i++) {
$labels [] = array("value" =>$i, "text" => $i);
}
?>
output: `[{"value":1,"text":1},{"value":2,"text":2},{"value":3,"text":3},{"value":4,"text":4},{"value":5,"text":5}]`
しかし、私は必要なもの:配列出力構造
[{"value":5,"text":1},{"value":4,"text":2},{"value":3,"text":3},{"value":2,"text":4},{"value":1,"text":5}]
そのことについて任意のアイデア?