note 104527 added to function.parse-url

From: Date: Tue, 21 Jun 2011 13:45:34 +0000
Subject: note 104527 added to function.parse-url
Groups: php.notes 
Request: Send a blank email to php-notes+get-180804@lists.php.net to get a copy of this message
To get the params (url query) as Associative array, use this function: /** * Returns the url query as associative array * * @param string query * @return array params */ function convertUrlQuery($query) { $queryParts = explode('&', $query); $params = array(); foreach ($queryParts as $param) { $item = explode('=', $param); $params[$item[0]] = $item[1]; } return $params; } ---- Server IP: 69.147.83.197 Probable Submitter: 194.209.131.34 ---- Manual Page -- http://www.php.net/manual/en/function.parse-url.php Edit -- https://master.php.net/note/edit/104527 Del: integrated -- https://master.php.net/note/delete/104527/integrated Del: useless -- https://master.php.net/note/delete/104527/useless Del: bad code -- https://master.php.net/note/delete/104527/bad+code Del: spam -- https://master.php.net/note/delete/104527/spam Del: non-english -- https://master.php.net/note/delete/104527/non-english Del: in docs -- https://master.php.net/note/delete/104527/in+docs Del: other reasons-- https://master.php.net/note/delete/104527 Reject -- https://master.php.net/note/reject/104527 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#180804) next »