1. Variables by noxx
noxx

1. Variables

by noxx in Tutorials

Hello,

I would like to tell you more about the basics of PHP.

1. Variables
1.1 Variables?
Variables will be use as a cache for datas or information, in order to use and work with this information in the course of our Program.

1.2 name of a variable

A variable starts with an $ and needs a letter or an undersore ( _ ).

This Table will show you all possibilties of a "variablename":

Table: Namepossibilities
$hellothere -> works
$HelloThere -> works / isn't the same like $hellothere!
$7shadows -> doesn't work, because the first place have to be a charcter or an underscore
$_7shadows -> works
hellothere -> doesn't work, becouse the $ is missing

The name should also be a short one and the should describe the value.

1.3 value of a variable

  • Views:250 views
  • Submitted:Jan 5th, 2008
  • Resolution:100x100
  • Date Created:Jan 5th, 2008
  • Filesize:29 KB
  • Software:Adobe Photoshop CS2
  • Share to:Facebook
  • Copy Link:
  • SN Code:
  • Press Enter to submit and Shift+Enter to add a line