phpeveryday.com

The best tutorial of php, php framework, php strategies, object oriented oriented,


PHP Basic: Variable

Tag: data type, variable   Category: PHP Basic
post: 01 Mar 2008 read: 209


PHP Basic Data Type Step By Step Tutorial - Part 11:Variable is a location in computer memory for saving data or value. The variable content can fluctuate during the program process. Variable in php always early with the dollar sign ($), then followed by the variable name that is having the sensitive case character.

Example: $date, $_month, $my_book, $_idea, etc.

Pay attention to the example of using variable at script as following:
File name : variable.php


<html>
<head>
<title>Using Variable</title>
</head>

<body>
<?
	$direction1 = "north";
	$direction2 = "south";
	$direction3 = "west";
	$direction4 = "east";
	echo "$direction1, $direction2, 
        $direction3, $direction4";
?>
</body>
</html>
php basic variable



| Give Your Opinion | Recommend
Share and Bookmark to: These icons link to social bookmarking sites where readers can share and discover new web pages.
digg del.icio.us technorati Ma.gnolia BlinkList

Recommended articles by other readers:
Web Services: How PHP Kiss VB.NET? (Part 1)
Chart: How to Build Cool Animation Real Time Chart
Joomla: Fast Road to Understand Component Programming
Email: Send Attachement Mail
mod_rewrite - Part 1: create your "fantasy" URL

What do You Think?
Your Name *:
Email *:
(Will not be published)
Website/URL:
Your Comment *:
* Required


615
posting