Share
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Aviance School is one of the largest web solutions platform in India for developers to learn and share their programming knowledge and build their careers.
json_encode() — Returns the JSON representation of a value
<?php
$array = array('a' => 10, 'b' => 20, 'c' => 30, 'd' => 40);
echo json_encode($array);
?>
Output:
{"a":10,"b":20,"c":30,"d":40}