Wow, that is a lot simpler than I imagined. Thanks for the tip!


Jay Blanchard wrote:


[snip]
I thought this would be the easiest thing to learn, but I'm striking out

right and left. I bought a book about PHP, but the includes examples don't work for me at all. I searched several forums and www.php.net, but

it's hard to even zero in on a good tutorial.
[/snip]

http://www.php.net/include

There is no tutorial for this because it is painfully simple to use.

Create toBeIncluded.php --

<?php
$todayDate = date("m-d-Y");
?>

<h1>Today is <?php echo $todayDate; ?></h1>

You're all done!

Now create myIncluded.php --

<html>
<head></head>
<body>
<h1>Welcome!</h1>
<?php

inlclude("toBeIncluded.php");

?>
</body>
</html>

All done! Now just place these files in the same directory in your web
server and load myIncluded.php from the browser. You may have to pay
close attention to the paths of the files, but it is pretty simple
really.

HTH!

-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php



Reply via email to