Re: _SERVER variable insd prnt sttmnt

From: Date: Mon, 29 Apr 2002 15:08:56 +0000
Subject: Re: _SERVER variable insd prnt sttmnt
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-95169@lists.php.net to get a copy of this message
On Monday 29 April 2002 23:05, Kirk Babb wrote: > 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]'>" . Normally you would use: $_SERVER['PHP_SELF'] But inside a double-quoted string like above you would use: $_SERVER[PHP_SELF] -- Jason Wong -> Gremlins Associates -> www.gremlins.com.hk Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * /* Work expands to fill the time available. -- Cyril Northcote Parkinson, "The Economist", 1955 */

« previous php.general (#95169) next »