Walk Lightly on this PLANET and yet leave such a FOOTPRINT that cannot be erased for thousands of Years..!!!
Visit Codstech for Cyber Security related Posts !

Visitors

Monday, September 23, 2013

PHP-2 : Using color ($)

Refer this introduction , before doing any PHP program.
PHP Introduction - And some useful points in Programming
  • Open Dreamweaver to write php code , with in the body tag .That is , 
<body>
.......................} php code 
</body> .
and save it (as .php) under the www directory of wamp server.
  • Then click wamp-->localhost to view it in the browser.
=================================================================

<!DOCTYPE html>
<html>
<body>

<?php
$color="red";
echo "My car is " . $color . "<br>";
?>  

</body>
</html>

Output :

My car is red

Note :
In PHP , all variables are case-sensitive.
$color="red"...is correct ($COLOR, and $coLOR are wrong.)

Back to HOME & PHP 

No comments: