note 56396 added to function.parse-str

From: Date: Thu, 01 Sep 2005 10:14:48 +0000
Subject: note 56396 added to function.parse-str
Groups: php.notes 
Request: Send a blank email to php-notes+get-94574@lists.php.net to get a copy of this message
In reply to what kerosuppi posted: [quote]This does not work as expected.[/quote] No, it works exactly as expected. The call <?php parse_str($this->query_string);?> "sets variables in the current scope" (just like said in the manual). You are using this call in the constructor. Once the constructor is finished, the scope of this function has ended so it's logical that you can't access the variables anymore. Your workaround though is a good one. Hope this helps, ET ---- Manual Page -- http://www.php.net/manual/en/function.parse-str.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+56396 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes&reason=useless Delete: non-english -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes&reason=non-english Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+56396&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+56396&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#94574) next »