Home  >  Q&A  >  body text

PHP returns a two-dimensional array to ajax. How does ajax display the values ​​in this two-dimensional array on the page?

As the title states, PHP has successfully passed the two-dimensional array back to ajax. Using alert in ajax can successfully print out the two-dimensional array, but when alerting a one-dimensional array, a pop-up window will appear

#Prompt is undefined. I want to display the specific values ​​in the two-dimensional array on the page. Could you please tell me how to achieve this?

LRTRLLRTRL2691 days ago1361

reply all(1)I'll reply

  • 依依惜别离

    依依惜别离2017-06-27 17:53:07

    alert cannot print out the array, use console.log to test it

    reply
    0
  • Cancelreply