Post: PHP Variables
08-24-2013, 03:03 AM #1
Dan
I'm a god.
(adsbygoogle = window.adsbygoogle || []).push({}); For the next couple of days I plan on posting a few PHP tutorials. Smile

A variable starts with a "$" and the name you use, variables are case sensitive. A valid variable name starts with a letter or underscore, followed by any number of letters, numbers, or underscores, I.E:

    
$variable
$-variable
$_variable
$34525


"$this" can't be used as it a default php variable.

You can do "plus, minus, divide, times, etc" with PHP like so:

    
$ex = '5';
$ex2 = '5';

echo $ex + $ex2; //This would output 10


Or you could just do:

    
$ex = '5+5';

echo $ex; //Would output 10


That's just some of the things you can do with variables, but this tutorial is over, thanks for reading! :p
Last edited by Dan ; 08-24-2013 at 03:23 AM.

Copyright © 2024, NextGenUpdate.
All Rights Reserved.

Gray NextGenUpdate Logo