iNET Interactive - Online Advertising Agency
          
   Home    Authors    About    Login    Contact Us
   Search:   
Advanced Search     
  Articles

  ASP (26)
  ASP.NET (19)
  C and C++ (4)
  CFML (2)
  CGI and Perl (16)
  Flash (2)
  Java (7)
  JavaScript (28)
  PHP (92)
  MySQL (13)
  MSSQL (3)
  HTML (35)
  SEO (9)
  Visual Basic (12)
  CSS (13)
  SSI (5)
  XML (12)
  C# (14)

  Developer News

July 4, 2009
US online advertisers scramble to avoid new privacy legislat...
WebDevTips UK
 
July 4, 2009
Massive Bank Fraud In EVE Online
WebDevTips UK
 
July 4, 2009
Amazon Wants Patent For Inserting Ads Into Books
WebDevTips UK
 
July 4, 2009
Mafia Wars Becoming "Cult Classic"
About
 
July 4, 2009
Facebook Privacy and Google
About
 
July 3, 2009
Why Freelancing is Awesome
About
 
Courtesy of moreover.com
 
Want to receive new articles via e-mail? Click here!
/Home /PHP /Introduction to PHP

PHP Lesson Two - Variables 

  Views:    35116
  Votes:    4
by James N Hitz 1/23/04 Rating: 

Synopsis:

Lesson 2: takes you into the realm of PHP variables, how they are defined, concatenation and PHP operators.
Pages: firstback1 2 3 4 5 6 8 9 10 forwardlast
The Article

Back to Variables aka Scalars

You've just learnt that PHP variables are... "little boxes" in the computer's memory that are given a name and a value. The value is assigned using the assignment operator (=).

Even though there are no different variables according to data type, we said that the PHP variables will define themselves accordingly depending on the data assigned. The data could be:
Integers - These are whole numbers eg 21, 34, -34
Floating Point Numbers - Numbers with fractions eg 21.785, 34.00, -1.23e4
Strings. This is alphanumeric data not intended for calculations eg "Motor Car", "Solomon", "1795", "Omwanango". Strings are enclosed in double quotes.

Integers, Floating Point Numbers and Strings are called scalars. This means that they only can retain ONE value. It is also possible to have arrays. An array is a collection of several things. We will get into this later.

In the mean time we consider Data Conversion and Type Jugling - these allow users to change a value to either a string, a floating point number or an integer. Sounds like fun. True? Ok Maestro...

Pages: firstback1 2 3 4 5 6 8 9 10 forwardlast

Similar/related articles:


 
  Sponsors