All in one forum  - Applications | Games | E-Books | Music, Movies & Videos | Mobile Stuff | Live Discussions | Webmaster Stuff | Many More | Community to Hang Out & 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
Free Image Hosting Solution for all Your link here @ 10$ 10 K Unique Visitors 1 Million Visitors Per Month Your link here @ 10$

Your Ad Here

Rate This Thread - Variables in PHP.

Post New Thread Reply
 
LinkBack Thread Tools Display Modes
  (#1 (permalink)) Old
 
KoOL's Avatar
 
User Info
Join Date: Oct 2007
Location: In You Mind
Age: 27
Achievements Posts: 10,858
Casino Cash: $1149780

Total Points: 238,174,927,402.19
Donate

KoOL has disabled reputation

Awards Showcase
Administrator Of the Month Of Jan 
Total Awards: 1
Variables in PHP - 06-13-2008, 05:27 AM

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

Please don't PM me For Posts, Request and Not Working Threads. Use Button.
Reply With Quote
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

Bookmarks


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


New To AiO Forum? Need Help?

All times are GMT. The time now is 12:36 AM.
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
vBulletin Skin developed by: vBStyles

RapidShare Links PhazeDDL Warez
PhazeDDL Warez