Skip to content

Instantly share code, notes, and snippets.

@joshuaadickerson
Created May 14, 2013 00:49
Show Gist options
  • Select an option

  • Save joshuaadickerson/5572771 to your computer and use it in GitHub Desktop.

Select an option

Save joshuaadickerson/5572771 to your computer and use it in GitHub Desktop.
<?php
function getRoute(array $parameters)
{
global $scripturl;
$param_string = '';
foreach ($parameters as $k => $v)
$param_string .= $k . '=' . $v . '&';
return $scripturl . '?' . $param_string;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment