How to write simple PHP

April 21, 2016

by — Posted in PHP

PHP is a highly popular language used for web programming and is recommened for those wanting to create good quality websites or for those who want to get “under the hood” of a CMS.

So create a new file and call it index.php

Copy & paste the follow ing code in to your php file

<?php ?>
<div id="copyright">
&copy; <?php echo date("Y") ?>
</div>

Now save that file and open it in your browser of choice, The following will be displayed: © 2016

 

Congrats! You have now written a webpage with PHP!

 

Dave Lynch, Developer.

Leave a Reply

Your email address will not be published. Required fields are marked *