Zenax
Active Member
- Messages
- 1,377
- Reaction score
- 4
- Points
- 38
Well I thought in order to test my skills I would write a tutorial on PHP! It is only basic, so to help out others etc.
Result: Hello World is written to the page!
Result is still Hello World on the page, however the text is stored in the variable $text
Result is Hello World! Hello Monkey, written to the page. The variable is the same however the instances of them are different. Note the [1] and [2] next to them.
Hope you find it simple and easy to understand.
Author: Zenax
PHP:
<?php
echo ('Hello World');
?>
Result: Hello World is written to the page!
PHP:
<?php
$text = "Hello World!";
echo ($text);
?>
Result is still Hello World on the page, however the text is stored in the variable $text
PHP:
<?php
$text[1] = "Hello World!";
$text[2] = "Hello Monkey!";
echo ($text[1]);
echo ($text[2]);
?>
Result is Hello World! Hello Monkey, written to the page. The variable is the same however the instances of them are different. Note the [1] and [2] next to them.
Hope you find it simple and easy to understand.
Author: Zenax