Basic PHP Programming

PHP based programming must be started with <?php and must be ended with ?>

<?php -------- as you wish code here :) --------- ?>

Simple Example :

<?php echo "Hello World"; ?>

PHP basic rules :

‘echo’ is a basic function for ‘ write ‘ your code on browser page and its just can use for ‘one description’. ‘ echo ‘ cannot be use for array description array used to using ‘ print_r() ‘, string type only can be used with ‘ string here ‘ or ” string here “, we can combine PHP with HTML syntax (HTML on PHP). example;

<?php

echo ' I am newbie '.'<br/>';

echo " Just using WP Online :D "."<br/>";
echo $a.'<br/>';
print_r ($b);

?>

for declarated variable we just put it.

next post Insya Allah about PHP on HTML.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s