javascript - Array not passing with ajax. -
This is a Java code code for AJAX calls. In this case, get the code
variable AC program code and pass it on the compiler.php
page.
Ajax call works well but the case is in php file. I am decoding the Jason array for the $ arr
variable but if I echo
this way < Code> echo $ arr [0] This is empty but if I type the code
for the array in the Java script like var arr = new array ("aaa", " C ") in I do not get it;
Its working fine Some can tell me that when I send the array with the code
variable then what is wrong? This is a php file.
server_controlers / compiler.php? Q = "+ JSON.stringify (AR)
Your data is not being made secure URL. You say that there is c
in the code, it means That is, in this case (for example) the & Amp;
character that breaks the string string format and JSON will be invalid if it is removed from it.
encodeurIComponent
to run it is in your URL.
server_controlers / compiler.php? Q = "+ encodeurIComponent (JSON.stringify (arr))
Comments
Post a Comment