Home >Backend Development >PHP Tutorial >php http_build_query() small example of building query parameters

php http_build_query() small example of building query parameters

WBOY
WBOYOriginal
2016-07-25 08:57:30977browse
  1. /**
  2. * http_build_query() build query parameters
  3. * edit: bbs.it-home.org
  4. */
  5. $vars = array('page' => 4, 'search' => 'this & that');
  6. $qs = http_build_query($vars);
  7. $url = 'http://bbs.it-home.org/search.php?' . $qs;
  8. $page = file_get_contents($url);
  9. ?>
复制代码


Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn