http_build_query參數拼接url

http_build_query — 生成 URL-encode 以後的請求字符串php

<?php
$data = array('foo'=>'bar',
              'baz'=>'boom',
              'cow'=>'milk',
              'php'=>'hypertext processor');
              
echo http_build_query($data); // foo=bar&baz=boom&cow=milk&php=hypertext+processor
?> 
複製代碼
相關文章
相關標籤/搜索