note 104692 deleted from function.parse-str by danbrown
| From: | danbrown@php.net | Date: | Thu, 30 Jun 2011 21:43:44 +0000 |
| Subject: | note 104692 deleted from function.parse-str by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-181124@lists.php.net to get a copy of this message | ||
Note Submitter: gustavo dot andriuolo at vulcabras dot com dot ar
----
If you want to parse google query, note thet the first varible are not showed beause it doesn't
start with &. Sometimes Google search put "q=whatever" at first an it's a
problem. I fix it in this way:
<?php
$p = parse_url('http://www.google.com.ar/search?q=PHP+Home+Page&tbo=p&tbm=vid&source=vgc&hl=es&aq=f');
$query = $p['query'];
$result = parse_str($query);
echo $q;
?>
It will return "PHP Home Page"