Re: Nested PHP
| From: | Russell Shaw | Date: | Mon, 02 Feb 2004 01:31:07 +0000 |
| Subject: | Re: Nested PHP | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-176540@lists.php.net to get a copy of this message | ||
Robby Russell wrote:
Russell Shaw wrote:I am generating dozens of rows of a table with entries from a database. Each row has an option selector that has dozens of choices, derived from another database. So, the first php pass generates the table, then the second pass generates the choices list in each row.Hi, I have php code embedded in html, that is read by apache. Is nested php code allowable such as: <? $phpcode="<? echo \"< some html >\" ?>"; ?> ... <html> ... <body>Not sure what you're trying to do there.<? echo "$phpcode" ?></body> </html>
You can do this: <?php $phpcode = "<b>hello world!</b>\n"; ?> <html> <body>I have done that a lot.<?php echo $phpcode; ?></body> </html>