PDA

View Full Version : Basic PHP Tutorial - 6



ctt1010
11-01-2014, 02:09 PM
In this tutorial we will learn about echoing words and variables. For this, we will have to "connect" the variable with the word.

Example :



<?php
$var = "Hi";


If we wanted to echo out : "Hi there" since $var is Hi, we would connect them by doing this :



<?php
$var = "Hi";
echo $var . " there";


This would print : "Hi there".

We have to use this if we want to connect a variable with text as that is the only way.