PHP Conference Kansai 2025

Voting

: min(zero, six)?
(Example: nine)

The Note You're Voting On

xellisx
16 years ago
I need to parse out the query string from the referrer, so I created this function.

<?php
function parse_query($val)
{
/**
* Use this function to parse out the query array element from
* the output of parse_url().
*/
$var = html_entity_decode($var);
$var = explode('&', $var);
$arr = array();

foreach(
$var as $val)
{
$x = explode('=', $val);
$arr[$x[0]] = $x[1];
}
unset(
$val, $x, $var);
return
$arr;
}
?>

<< Back to user notes page

To Top