Re: How to echo the end marker '?>'

From: Date: Fri, 08 Nov 2002 12:41:59 +0000
Subject: Re: How to echo the end marker '?>'
References: 1 2 3  Groups: php.general 
Request: Send a blank email to php-general+get-123366@lists.php.net to get a copy of this message
I'm just curious. Why do you want to echo within an echo? echo '<form action="'.$PHP_SELF.'">'; will do the trick won't it? Unless I miss the point, I cannot see why you need to open new php tags for this? On Fri, 2002-11-08 at 14:25, Ernest E Vogelsinger wrote: > At 12:15 08.11.2002, Philipp Bolliger spoke out and said: > --------------------[snip]-------------------- > >subject's allready my question ! I want to echo something like : "<form > >action = \",?php echo $PHP_SELF ?> \" >" so that the action becomes > ><? > >echo $PHP_SELF ?> !! But I can't figure out how to escape ?> so that the > > interpreter doesn't take it as the end of the script ! Any idea ? > --------------------[snip]-------------------- > > Try > > echo '<form action="', '<', '?', 'php echo > $PHP_SELF', '?', '>', '">'; > > This should work (untested) > > > -- > >O Ernest E. Vogelsinger > (\) ICQ #13394035 > ^ http://www.vogelsinger.at/

« previous php.general (#123366) next »