is this possible? i want to return name and type of a car, in one json element.
The normal way is this,
{
$return = array ('label' => $row['name'],
'Type' => $row['Type'],
);
}
echo json_encode($return);
But i want something like this so i can just call "NameType",
$return = array ('NameType' => $row['Name', 'Type'],
);
the above should normally be like this.
I know my syntax is wrong.
$return = array ('NameType' => array($row['Name'], $row['Type']));?