Basic PHP – Part 1

This article is about very basic of PHP coding, creating functions and database connection using PHP. Later posts may contain detail about other features.

Target viewers are assumed as familiar with C/JAVA or other similar programming language. So I didn’t bother to clarify basic syntax.

Writing PHP code:

All your PHP content should be inside <? ?> tags. That is the file format should be:

<?
Your content here.
?>

Most of the functions in PHP are similar to C. So if you can code in C, you can code in PHP. There are simple exceptions as: Continue reading