How to get the output HTML of a php file in php variable...
Posted: Thu Feb 16, 2006 8:09 am
I have a block of code which has php and HTML content in it. I want to execute this code and get the output HTML which I would be assigning to another PHP variable for use by render engine in templates.
I am saying something similar to executing a PHP file which has PHP and HTML content in it...but this is not a file but it is a set of code which has to be executed....
a simple example would be...
I want this block to be executed and I want the HTML output...hope you get what I am trying to tell you guys...
I am saying something similar to executing a PHP file which has PHP and HTML content in it...but this is not a file but it is a set of code which has to be executed....
a simple example would be...
Code: Select all
<!-- Day Range -->
<select name="day">
<?php for ($i = 1; $i <= 31; $i++){?>
<option value="<?php echo $i; ?>"><?php echo $i; ?></option>
<?php } ?>
</select>