+ Reply to Thread
Results 1 to 2 of 2

Thread: Variables

  1. #1
    clookid's Avatar
    clookid is offline Programmer
    Join Date
    Jan 2007
    Posts
    125
    Rep Power
    0

    Variables

    Variables

    In PHP as in most computer programming languages, data can be stored in named areas of memory called variables. Variables can contain numbers, text, even binary data, as well as arrays (lists). They're also used to store references to files and database query results.

    Arrays are special, so I'll go into those separately, but for the most part using variables is simple. All variable names begin with a $ and are followed by one or more letters. You can use numbers, too, and underscores ( _ ), but not spaces. Variable names are case sensitive - beware! $FOO is not the same as $foo.

    Code:
      $foo 3;
      
    $myline "Hello world"
    Unlike some other languages, you don't have to declare your variables before you use them, though for security reasons, it's recommended that you declare some of them (for example, session variables). I'll cover this in greater detail later.

    This tutorial was written by another one of my friends, if you would like to use this tutorial please send me a PM
    Last edited by clookid; 01-10-2007 at 09:48 PM.

  2. CODECALL Circuit advertisement
    Join Date
    Always
    Posts
    Many

     
  3. #2
    xtraze is offline Programming God
    Join Date
    Dec 2006
    Location
    Sri lanka
    Posts
    911
    Rep Power
    0
    Many things in PHP and xHTML is case sensitive,
    your tutorial rocks dude. nice.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Using Environment Variables
    By AIGuy in forum C and C++
    Replies: 5
    Last Post: 01-23-2011, 02:56 PM
  2. JavaScript Variables
    By Hunter100 in forum JavaScript and CSS
    Replies: 1
    Last Post: 04-02-2010, 05:56 AM
  3. TextOutW and Variables
    By intrinsik4 in forum C and C++
    Replies: 1
    Last Post: 12-16-2009, 06:29 PM
  4. 2 variables and 2 objects
    By Siten0308 in forum C# Programming
    Replies: 3
    Last Post: 10-16-2008, 12:02 PM
  5. Variables
    By Sionofdarkness in forum Java Help
    Replies: 4
    Last Post: 08-21-2006, 12:32 PM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts