0

Is it posible to store php array in jquery variable?

2 Answers 2

2

Yes it is.

You can json_encode your array in PHP and then use it with jQuery via a getJSON request.

See: http://php.net/json_encode and http://api.jquery.com/jQuery.getJSON/

Sign up to request clarification or add additional context in comments.

Comments

0

you can either use a json request or store the variable on a hidden fiel on page load and read it with jquery

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.