I have this JSON string.
[
{
"name": "user_title",
"value": "Bapak."
},
{
"name": "user_firstname",
"value": "Test"
},
{
"name": "user_lastname",
"value": "XXX"
}
]
This string generated dynamically. It may has more or less. I use JSON Decode to process it in PHP.
$json_form = json_decode($json_string,true);
$user_title = $json_form[0]['value'];
$user_firstname = $json_form[1]['value'];
$user_lastname = $json_form[2]['value'];
How do I check the variable user_title even exist in the string?
If it exist I should get the value but if not that means $user_title = NULL.