blog posts

databases (1) django (1) drupal (2) java (4) processing (7) wamp (1) yahoo pipes (1)

Tuesday, 18 January 2011

Writing Hello world in php

you first need open and closed tags

<?php

?>


now you want to print out the text hello world in a variable.
$text = 'Hello World';
 A variable is a storage mechanism to store a value. In php you dont need to declare the type of variable that you need to in other languages such as java.
The print function that is found in php is echo

so if we now want to print hello world

<?php
$text = 'hello world;
echo $text;

?>

In this tutorial you learnt the basic syntax for the openning and closing tags in php as well as what a varaible is and hwo to print text using a variable

No comments:

Post a Comment

Popular Posts