Accessing multidimensional array in JS created by PHP's json_encode

Here is some PHP code:

echo "map = " . json_encode($map) . ";";

How do I access these items in Javascipt?

I've tried all sorts:


but nothing seems to work :(



Works for me, except for your last one

<script type="text/javascript">


print "map = ".json_encode($map).";\n";



Need Your Help

How do I create a clickable item in menu to open a new activity?

android menu android-activity clickable

I have made an app with a lot of buttons and activities. I'm having trouble though understanding how to start a new activity through a button that is in my menu (when the menu button is clicked on ...

Getting error on gettext from edittext?

android string gettext

I'm making a simple application that changes images when a certain string is typed in a dialog box but when I try to get the string from edit text(in the dialog) the application stops and gives an ...

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.