Lost Password?

Go Back   CodeCall Programming Forum > Software Development > Tutorials > PHP Tutorials

Unregistered, Check out the Coder Battles in the Announcement and Game forums.

PHP Tutorials PHP Tutorials

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-10-2007, 05:08 PM
clookid's Avatar   
clookid clookid is offline
Programmer
 
Join Date: Jan 2007
Posts: 148
Credits: 0
Rep Power: 7
clookid is on a distinguished road
Default 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.

PHP 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 11:48 PM.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote

Sponsored Links
  #2 (permalink)  
Old 01-11-2007, 08:40 PM
xtraze xtraze is offline
Programming God
 
Join Date: Dec 2006
Location: Sri lanka
Posts: 921
Credits: 5
Rep Power: 0
xtraze is on a distinguished road
Send a message via MSN to xtraze Send a message via Skype™ to xtraze
Default

Many things in PHP and xHTML is case sensitive,
your tutorial rocks dude. nice.
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
Global variables (SERVER) Jaan PHP Tutorials 0 03-22-2007 09:43 PM
Java:Tutorial - The Variable John Java Tutorials 0 12-09-2006 09:59 AM
Save variables yoda855 Visual Basic Programming 9 08-22-2006 07:10 PM
Variables Sionofdarkness Java Help 4 08-21-2006 02:32 PM
Howto use global variables dirkfirst PHP Forum 4 07-15-2006 02:19 PM


All times are GMT -5. The time now is 04:26 AM.

Contest Stats

Xav ........ 1024.41
MeTh0Dz|Reb0rn ........ 974.08
morefood2001 ........ 850.04
John ........ 841.93
WingedPanther ........ 661.52
marwex89 ........ 575.59
Brandon W ........ 456.18
chili5 ........ 292.12
orjan ........ 187.41
Steve.L ........ 181.88

Contest Rules

CodeCall Goal

Goal: 100,000 Posts
Complete: 79%

Ads