All in one forum  - Applications | Games | E-Books | Music, Movies & Videos | Mobile Stuff | Live Discussions | Webmaster Stuff | Many More | Community to Hang Out and Stick to
Search Today's Posts Mark Forums Read

Go Back   Home > Tutorial Section > Programming > PHP
Reload this Page [Tutorial] Variables in PHP
Forgot Password? Join Us!
PHP Post your Personal Home Pages Programing Tutorial Here

Notices
Your link here Your link here Your link here Your link here Your link here

Your Ad Here


Rate This Thread - Variables in PHP.

Post New Thread Reply
Bookmarks
 
LinkBack Thread Tools Display Modes
Old 06-13-2008, 05:27 AM   #1 (permalink)
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 26
Achievements Posts: 10,268
Casino Cash: $1066420

Total Points: 236,720,619,195.51
Donate

Reputation: 90383
KoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond reputeKoOL has a reputation beyond repute


Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Variables in PHP

If you did not guess, variables are the most important thing in php and most other programming languages.

I'll be telling you about simple variables and how to use them.

Common variables look like this:

Code:
$variable
And to define what the variable is you do this:

Code:
$username = "Carnage";
After doing this, php will now recognise "$username" to mean "Carnage". So if you write this afterwards:

Code:
echo "Username: $username";
When uploaded the page will show this:

"Username: Carnage"

Thats basic string variables but you can use number variables too.

Try out this page:
Quote:
<?php
$firstNum = 1;
$secondNum = 3;
$thirdNum = $firstNum + $secondNum;

echo "$firstNum + $secondNum = $thirdNum";

?>
This will make "1 + 3 = 4".

To multiply number use * and to divide them use /

Variables are very important, use them wisely, and experiment.

My next tutorial will be on functions, thanks for reading.

For Download Links U need to Press Thanks Button
My Goal 2: (Complete 10000)

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
KoOL is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply
The Following User Says Thank You to KoOL For This Useful Post:
barnick (06-28-2008)
Click here to Donate to remove the Adverts.
Your Ad Here
Post New Thread Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
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
Forum Jump



Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles

RapidShare Links PhazeDDL Warez
PhazeDDL Warez