Pass PHP Array via jQuery Ajax

后端 未结 5 979
粉色の甜心
粉色の甜心 2021-01-22 13:40

I\'ve got a php array:

$toField = explode(\",\", $ids);  //Which looks something like \'24,25,26,29\'

I want to pass this array via jQuery AJAX

5条回答
  •  [愿得一人]
    2021-01-22 13:57

    Few things going on I'd sort out:-

    • You're missing the id 'toField' on your toField input element.

    • You should be using implode() on the $id variable rather than exploding it.

    • On the otherside you should be calling explode() on the recieverId string.

提交回复
热议问题