You are here

function swftools_url_parse in SWF Tools 6

Same name and namespace in other branches
  1. 5 swftools.module \swftools_url_parse()
  2. 6.2 swftools.module \swftools_url_parse()
1 call to swftools_url_parse()
_swftools_filter_process_text in ./swftools.module

File

./swftools.module, line 1188

Code

function swftools_url_parse($string) {
  $return = array();
  $pairs = split("&", $string);
  foreach ($pairs as $pair) {
    $splitpair = split("=", $pair);
    if (!$splitpair[1] || array_key_exists($splitpair[0], $return)) {
      $return[] = $splitpair[0];
    }
    else {
      $return[$splitpair[0]] = $splitpair[1];
    }
  }
  return $return;
}