Home

Kenny's Blog

20 Mar 2014

PHP!

As a Computer Engineering Student, the majority of my curriculum is more or less focused on Hardware and Information Systems. Most students enrolled in the Electrical Engineering department at UH Manoa don’t get any experience with web development. Its a good thing that there are plenty of resources for web development on (appropriately enough) the internet!

During the brief time I spent as a Co-Op at Advanced Micro Devices (AMD), I had the opportunity to get my feet wet with some web development! I re-learned HTML and CSS, and picked up PHP and Javascript as well. Surprisingly enough, I learned, PHP is extremly easy to interweave into HTML, so long as you title your documents with a “.php”.

If you’ve taken a programming class in either C or java, PHP’s syntax is VERY similar. One of the main advantages of being able to interweave PHP and HTML is that you can modularize your website fairly easily. There was a time before college where I “learned” CSS and HTML, but I found plain CSS and HTML lacking after I had been exposed to a software engineering workflow.

On my personal website (http://kennyluong.com), I’ve modularized my headers, footers and menu-bar to one dependency which is easily added to a page:

    <?php 
    $page = 'home';
    include('modules/menubar.php');
    ?>

Easy enough!