RE: [PHP] concatenating form variables within PHP3
| From: | php3 at developersdesk dot com | Date: | Sat, 09 Sep 2000 06:20:09 +0000 |
| Subject: | RE: [PHP] concatenating form variables within PHP3 | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-15975@lists.php.net to get a copy of this message | ||
Addressed to: Tom Walsh <TWalsh@achieversusa.com>
"'J. Myers'" <jr@mediastop.com>
php-general@lists.php.net
** Reply to note from Tom Walsh <TWalsh@achieversusa.com> Fri, 8 Sep 2000 10:26:34 -0400
>
> Simple...
>
> echo "<input type=\"hidden\"
> name=\"D".$day."_".$time."SHOW\"
> value=\"$hold\"><br>";
>
> I always find it is easier to type the HTML straight and then escape out
> your " and stuff when you go to PHP... It just makes it seem clearer to
> me...
I like this even better...
$DayStuff = 'D' . $day . '_' . $time . 'SHOW';
?>
Other HTML and fields goes in here...
<input type="hidden" name="<?=$DayStuff?>"
value="<?=$hold?>"><BR>
More HTML & fields here too
<?
IF you have more than a line or two of HTML to send drop back into HTML
mode (?>) and send it. Just type the html like you want it with
variables inside <?=$variable?>. This requires php4, but if you have not
already moved to 4.0.2 you should do so as soon as possible.
Rick Widmer
Internet Marketing Specialists
www.developersdesk.com