<?php
function print_details($json) {
$args = json_decode($json);
echo "My first name is {$args->first_name}<br />";
echo "My last name is {$args->last_name}<br />";
echo "My age is {$args->age}<br />";
}
print_details('{
"first_name": "keith",
"last_name": "hards",
"age": 37
}');
No comments:
Post a Comment