javascript help: i have a php page that echos
[‘A’, 28.006660938911], [‘B’, 71.993339061089]
now i need this converted into an array in javascript, but in ajax,
“var myData = new Array($http.responseText);”
does not work
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If given string is:
try evaluating it (if you have no access to the PHP code you are
using):
try changing the response to JSON format (if you HAVE access to
that PHP code):
if i am wrong and you are given with two different arrays, try
splitting the string first