How to get an array value after explode?

前端 未结 6 1261
感动是毒
感动是毒 2021-01-24 17:39

I have passed a value from one page to another in array. I can extract first two vars by explode but I can\'t get the third value which is formed in an array out.

This i

6条回答
  •  庸人自扰
    2021-01-24 17:52

    you can encode the values on the page as

    implode("|", array($total, $promo, implode(",",$rate));
    

    Then decode it with

    list($total, $promo, $rates) = explode("|", $_POST["user_rate"]);
    $rates = explode(",", $rates);
    

提交回复
热议问题