Jump to content

[SOLVED] Echo and assign string in same call


soycharliente

Recommended Posts

Refer to the title tag and the subsequent h1 tag inside the header.

 

This totally works, but I wanted to see what other people thought/felt when they saw it. Do you think that this is bad structure/coding practice? Obviously I could split it up into two calls. Do you think it's a 6 of 1/half a dozen type of thing? The only reason I did it was because it was faster to type. (But now that I've posted this thread here, I could have just done it with two calls and saved A TON of time, lol.)

 

<?php require_once($_SERVER['DOCUMENT_ROOT']."/include/globals.php"); ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>ch › <?php echo $page = "colophon"; ?></title>
<?php include $_SERVER['DOCUMENT_ROOT']."/include/meta.php"; ?>

</head>
<body>
<div id="wrap">
<div id="navigation">
	<?php include $_SERVER['DOCUMENT_ROOT']."/include/navigation.php"; ?>

</div><!-- /navigation -->
<div id="header">
	<h1><?php echo $page; ?></h1>
</div><!-- /header -->

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.