25, "label" => "Sunday"), array("y" => 15, "label" => "Monday"), array("y" => 25, "label" => "Tuesday"), array("y" => 5, "label" => "Wednesday"), array("y" => 10, "label" => "Thursday"), array("y" => 0, "label" => "Friday"), array("y" => 20, "label" => "Saturday") ); ?> format('m-d'); // Month-Day format // Initialize player array if not existing if (!isset($dataPointsPerPlayer[$playername])) { $dataPointsPerPlayer[$playername] = []; } // Add to dataPoints for this player $dataPointsPerPlayer[$playername][] = array( "y" => $jsonArray['winplace'], "label" => $label ); } } closedir($handle); } // Now, $dataPointsPerPlayer is an array that contains an array of data points for each player // You can access the data for a specific player like this: // $playerData = $dataPointsPerPlayer['Lanta01']; // Output the array for debugging purposes echo '
'; print_r($dataPointsPerPlayer); echo ''; ?>