Jump to content

Whats The Correct Way To Write This... !?


jigsawsoul

Recommended Posts

Whats would be the correct way to write this function?

 

any help please thanks :)

 

<?php

function template ($content)
{
<?php include($config["paths"]["resources"] . '_template/header.php'); ?>

<div id="header"> 
	<div class="innerwaraper">
  		<?php include($config["paths"]["resources"] . '_template/top.cart.php'); ?>
    	<?php include($config["paths"]["resources"] . '_template/nav.menu.php'); ?>
  	</div> 
</div> 

<div class="bodybg">  
	<div id="containner">

		<div id="leftbar"> 
    		<?php include($config["paths"]["resources"] . '_template/search.php'); ?>
      		<?php include($config["paths"]["resources"] . '_template/nav.categories.php'); ?>
      		<?php include($config["paths"]["resources"] . '_template/drop.manufacturers.php'); ?>
      		<?php include($config["paths"]["resources"] . '_template/left.boxs.php'); ?>
    	</div>
    	
   		<?php include($config["paths"]["resources"] . '_template/content.php'); ?>
   		
    	<div id="rightbar"> 
      		<?php include($config["paths"]["resources"] . '_template/nav.specials.php'); ?>
       		<?php include($config["paths"]["resources"] . '_template/drop.reviews.php'); ?>
			<?php include($config["paths"]["resources"] . '_template/popular.tags.php'); ?>
			<?php include($config["paths"]["resources"] . '_template/right.boxs.php'); ?>
    	</div> 

    	<div class="clear"> </div> 
  	</div> 
  	
  	<?php include($config["paths"]["resources"] . '_template/footer.php'); ?>
  	
</div> 

</body> 
</html> 

}

?>

Link to comment
https://forums.phpfreaks.com/topic/195945-whats-the-correct-way-to-write-this/
Share on other sites

error

Parse error: syntax error, unexpected '.' in /home/jigsaws2/public_html/project/resources/_library/template.php on line 7

 

i've rewritten the code

<?php

function template ($content)
{
echo '

'.include($config["paths"]["resources"] . '_template/header.php');.'

<div id="header"> 
	<div class="innerwaraper">
  		'.include($config["paths"]["resources"] . '_template/top.cart.php');.'
    	'.include($config["paths"]["resources"] . '_template/nav.menu.php');.'
  	</div> 
</div> 

<div class="bodybg">  
	<div id="containner">

		<div id="leftbar"> 
    		'.include($config["paths"]["resources"] . '_template/search.php');.'
      		'.include($config["paths"]["resources"] . '_template/nav.categories.php');.'
      		'.include($config["paths"]["resources"] . '_template/drop.manufacturers.php');.'
      		'.include($config["paths"]["resources"] . '_template/left.boxs.php');.'
    	</div>
    	
   		'.include($config["paths"]["resources"] . '_template/content.php');.'
   		
    	<div id="rightbar"> 
      		'.include($config["paths"]["resources"] . '_template/nav.specials.php');.'
       		'.include($config["paths"]["resources"] . '_template/drop.reviews.php');.'
			'.include($config["paths"]["resources"] . '_template/popular.tags.php');.'
			'.include($config["paths"]["resources"] . '_template/right.boxs.php');.'
    	</div> 

    	<div class="clear"> </div> 
  	</div> 
  	
  	'.include($config["paths"]["resources"] . '_template/footer.php');.'
  	
</div> 

</body> 
</html>

';

}

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.