JSON value not showing in HTML by PHP

There are few possibility why JSON data not being displayed properly.

To debug your data, use


If print_r shows empty or nothing, use



string '{"en":"Home","fr":"Office","cn":"bar"}' (length=1

Possibility 1) – json data being encoded to html code. Some CMS will encoded the json data output.

To solve this html entity issue, decode the data like example below:


By Keenlio, December 16, 2013

What do you think?

Leave a Reply

Your email address will not be published. Required fields are marked *

one + 9 =

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>