I'm trying to add a value media_type to every child of the array. The code I'm using is:
while($row = $result->fetch_assoc()) {
$url = "example";
$path = $this->get_url($url);
$popular = ['media_type' => $row["type"],$path];
}
Here's an example of the array:
.
This content in the array is from themoviedb API. And is opensource.