RE: [PHP] Form again

From: Date: Thu, 30 Nov 2000 22:48:08 +0000
Subject: RE: [PHP] Form again
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-32027@lists.php.net to get a copy of this message
You don't need quotes around a single variable if that's all your printing or echoing. It works either way, I just think print "$D4"; is sloppy compared to print $D4; As for the original question, if you enclose a string in single quotes, variables are not resolved. $name = "Bob"; echo 'Hello $name'; //echos "Hello $name" echo "Hello $name"; //echos "Hello Bob" ---John Holmes... -----Original Message----- From: JB [mailto:jbeebe@aimsmarketing.com] Sent: Wednesday, December 27, 2000 7:33 PM To: mpeloso@princeton.edu; php-general@lists.php.net Subject: Re: [PHP] Form again This::::: <input type="radio" value='<?php '$D4' ;?>' name='C4'><?php echo "$D4" ;?> Should be this::::: <input type=radio value="<?php print "$D4" ;?>" name="C4"><?php print "$D4" ;?> echo and print work the same, i just prefer print Mike <mpeloso@princeton.edu> wrote in message news:92d84f$3gt$1@toye.p.sourceforge.net... > Whats wrong with this: > <input type="radio" value='<?php '$D4' ;?>' > name='C4'><?php echo "$D4" ;?> > Its in a form. $D4 was passed to this form without a problem (it shows up > correctly in my table) but Im trying to repass it as C4 but its not working. > > This is the recieving form field: > <td width="100%"><?php echo '$C1';?></td> > Thanks > Mike > mpeloso@princeton.edu > > > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net > For additional commands, e-mail: php-general-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net > >

« previous php.general (#32027) next »