Sunday, June 16, 2013

php variables - some operations

In this lesson we will talk about operations in php and take some examples, Ready let's go
EXAMPLE 01:
<?php
$n1 = "12" ;
$n2 = "4" ;
echo "$n1" + "$n2" ;
?>
You should see 16 on the screen

EXAMPLE 02:
<?php
$n1 = "12" ;
$n2 = "4" ;
echo "$n1" * "$n2" ;
?>
You should see 48 on the screen, easy don't you think
When we have a good base in php language we will make interactive programs like calculator and games
Just be patient



Share This!



No comments :

Post a Comment