how to add things to a list in an array php code example Example: add object in array php $myArray = array("name" => "my name"); echo json_encode($myArray);