View Single Post
  #10 (permalink)  
Old 04-01-06, 03:41 AM
gorivo's Avatar
gorivo gorivo is offline
Newbie Coder
 
Join Date: Mar 2006
Location: Lithuania
Posts: 30
Thanks: 0
Thanked 0 Times in 0 Posts
David,

if your somefile.php and someotherfile.php contains only
PHP Code:

<?php echo 'COLOR NAME'?>

you should better user file_get_contents() function not ob_start();

not sure i understood you correctly, but maybe this will help:

PHP Code:

<?php


# $var1 will be set to RED
$var1 file_get_contents('somefile.php');

# $var2 will be set to YELLOW
$var2 file_get_contents('someotherfile.php');

echo 
'<table border="1" bgcolor='.$var1.'>
<tr><td>Row 1 Cell 1</td><td>Row 1 Cell 2</td></tr>
<tr><td>Row 2 Cell 1</td><td>Row 2 Cell 2</td></tr>
</table>'
;

?>
Gorivo.
Reply With Quote