skip to Main Content

Average from Array – PHP

<?php $games = [ ["Call of Duty", "Shooter", 59.95], ["Rocket League", "Sport", 19.95], ["Assassins Creed", "RP", 49.95] ]; ?> // i have an assignment where they want me to get the average string length from the titles and a average…

VIEW QUESTION

Array into a csv with PHP

I have the next foreach: foreach(json_decode($result[$k], "true") as $result) { fputcsv($fp, $result); } and if I put a var_dump of that result it will return a list of arrays like: ["Id"]=> string(7) "1" ["Name"]=> string(29) "Name" ["Description"]=> string(19) "Description" ["Address"]=>…

VIEW QUESTION
Back To Top
Search