_SERVER variable insd prnt sttmnt

From: Date: Mon, 29 Apr 2002 15:05:23 +0000
Subject: _SERVER variable insd prnt sttmnt
Groups: php.general 
Request: Send a blank email to php-general+get-95167@lists.php.net to get a copy of this message
Hi All, Thanks alot for all your help with the _SERVER['PHP_SELF'] earlier, I have another question related to that: What is the correct syntax for the above if I want to use it in a print statement like so (I included the whole piece of code so you guys could at least see what I'm trying to do): $string="ABCDEFGHIJKLMNOPQRSTUVWXYZ"; $chars = preg_split('//', $string, -1, PREG_SPLIT_NO_EMPTY); for ($cnt=0; $cnt < 26; $cnt++) { //commented out the next line since I couldn't get it to work //print "<LI><A HREF='$_SERVER['PHP_SELF']?letter=$chars[$cnt]'>" . $chars[$cnt] . "</A></LI>"; print "<LI><A HREF='$PHP_SELF?letter=$chars[$cnt]'>" . $chars[$cnt] . "</A></LI>"; } Now that I'm learning a bit about running with register_globals = Off I will try to implement it everywhere I can! -Kirk side msg: big thanx to Nathan for the short tutorial on globals and security

« previous php.general (#95167) next »