Encoding an array for url in PHP

前端 未结 1 1086
太阳男子
太阳男子 2021-01-25 14:57

I have been working on some QR codes, I need to pass an array to the QR with the data but it needs encoding. The data itself is a json_array which is used to genera

相关标签:
1条回答
  • 2021-01-25 15:36

    You can try this:

    urlencode($string);

    It encodes a string to be appended as an url parameter. So if you have an array, try:

    urlencode(json_encode($array);

    0 讨论(0)
提交回复
热议问题