Developing Webs logo
Google
Web DW-Main DW-Photoshop
Visit the message board for solutions or post a question Check out the Classes offered for free at Developing Webs Voice Chat submit a tutorial, resources, article, font for publication consideration and earn a one way link back to your site Get more specifics about the Developing Webs Voice chat room and its room members View the current news at Developing Webs alternative sites which are resources for your d3evelopment needs Join Developing Webs Chat Link to us on your web page to help support this resource! Check out Developing Webs At yahoo groups! Developing Webs Home Adobe Photoshop Tutorials Macromedia Flash Tutorials Jasc Paint Shop Pro Tutorials Adobe Illustrator Animation basics Some Basic PHP tutorials Perl Tutorials HTML Tutorials Cascading Style Sheets javascript Front Page Tutorials Macromedia Dream Weaver Tutorials dreamweaver Publishing your site, FTP, ChMod, Promotions
RSS Newsfeed
for your site
DW News
Calendar
DW Forum
Right click on button and copy shortcut

Add to My Yahoo!

Reminder
Remember to book mark this site!



Request a Tutorial

Begining PHP notes

Did you do the reading?

Week of 1/12/2003

Pages 20-30

Variables- things that can change depending on circumstances.

  1. The reference to a variable begins with a $ (The variable from the form if in html, does not have the $ )
  2. They are case sensitive
  3. The can't start with a number following the $
  4. Try to avoid Pre-existintg or Built in Functions
  5. Variables can be declared simply by setting a value.Types of variables: Defined by first instance of the assigned value- Also can be reassigned uppon reassignment in subsequent instances.
    1. Integer- whole numbers Ex. $totalquantity=0
    2. Double- Real numbers EX. $totalamount=0.00
    3. String- Characters
    4. Array- Multiple data or table
    5. Object- an object.
  6. Scope of the variable can be Global (the entire script), Local (just for this instance) or local to global.

Constants- Things that do not change within the course of the scripts

  1. The are represented in all upper case letters
  2. There is no $ in front of a constant.
  3. Can be defined by the simple assignment as follows:

    define ("TIREPRICE", 100);
     

Operators- are used to signify mathmatical operations.

  1. Operator examples
    1. =  is an assignment
    2. + add
    3. - subtrack
    4. / divide
    5. * multiply
    6. . concatonate (append)
  2. Applies to numbers
  3. Strings will have a value of 0 when used in these expresssions.


"Building The Web Into a Nicer Place -- One Site At A Time"
Developing Webs Group Copyright © 2001-2026 All Rights Reserved
Privacy and Legal