PHP Variables

This shows you how to use the essential PHP include funtion.

Variables are used to temporarily store values so those values can be used again later. These values can be text, numbers, arrays, or other items. The variable name must start with a dollar sign ($) and can contain letters, numbers, and underscores. The first character after the dollar sign must be a letter or an underscore. It cannot be a number. Variable names are case sensitive. Variables are given values using the equal sign. The complete syntax is below:

Syntax $variable=value;

PHP Variables

PHP Page

<html>
<head>
<title>HTML tutorial</title>
</head>

<body>

<?php
$text="This text was set as a variable.";
echo $text;
?>

</body>
</html>



This is how it looks

This text was set as a variable.





 
Bookmark this page:
   
Rate this page:
  • Currently 2.88/5
  • 1
  • 2
  • 3
  • 4
  • 5

Rating: 2.9/5 (167 votes)



Comments:

please post comments
admin November 21, 2006

 
Nickname:
Comment:
Security: 1+1=
Hosts
Lunarpages.com Web Hosting
iPowerWeb

Domain Registrars
PPC Networks
Logos
Affiliate Networks
Resources