Forum Moderators: coopster
Im using a selection of includes to produce a page template i.e.
index.php contains the following code:
<?php
$varTitle="Home";
$varSub="";
$bodyContents='<h5>Home</h5>';
include("includes/head.php");
include("includes/body.php");
include("includes/footer.php");
?>
The $bodyContents var is utilized by the body.php page which loads this data into the main content area..
NOTE:
$varTitle is for page titles and headings
$varSub is to specifiy if page is in a sub directory (if so value would be ../ - allows the images, scripts etc to be loaded).
Ok so onto the questions, ive seen here and there the use of (not entirely sure which way round) $var and $var. or .$var in this fasion:
$var="My ";
.$var="name ";
.$var="is ";
.$var="Jim.";
with
echo $var; (I think)
to output the contents of the multiple instances of $var.
Basically can anyone help me in the correct way to approach this method?
I'll close the post if i find a solution.
TIA