demo_json_encode1.php:
<!DOCTYPE html> <html> <body> <?php $age = array("Peter"=>35, "Ben"=>37, "Joe"=>43); echo json_encode($age); ?> </body> </html>