0

Possible Duplicate:
Parse Json in php

Im having a problem regarding this extra field value from joomla which I filtered from db. any help how to accomplish this? I need to split this {"id":"18","value":"3:00pm-6:00pm"} ang get only the value 3:00pm-6:00pm

any help would be appreciated thanks in advance ..

Community
  • 1
  • 1
james
  • 192
  • 7

1 Answers1

2

That's JSON. Use json_decode() to get the values.

$json = json_decode('{"id":"18","value":"3:00pm-6:00pm"}');
echo $json['value'];
John Conde
  • 212,985
  • 98
  • 444
  • 485