View Full Version : Php + -
10-16-2009, 04:29 PM
Hi, quick post, im just tryna figure out how to plus and subtract etc using php.
cant find any tutorials.
for example heres what i want to do
$MAGICNUMBER = 1+5 ;
<? echo "$magicnumber" ?>
just wondering if any body knows of a tutuorial or could show me how that should be set out.
would be appreciated.
thanks Allot in advance
10-16-2009, 04:36 PM
What you're doing is OK, but the variables must be the same (caps and small letters).
You have one all caps, the other all small ... which is incorrect.
To increment the variable, both of these produce the same result:
$magicnumber = $magicnumber + 1;
Pay attention to case-sensitivity ... your variables.
Not all webhosts are set-up the same for PHP, in regards to <?
You may be able to do this ...
or you may have to do this ...
10-16-2009, 04:55 PM
THANKS ALLOT :)
i know that php is usually case sensitive, i just missed the fact id wrote one in caps and one without, i must have had caps on for some other reason.
i knew that could be done, and assume that's how i should do it, but when it didnt work i just assumed id done it wrong and couldnt find a tutorial
again, thanks for your help :)
this is great to start off http://www.tizag.com/phpT/
Powered by vBulletin® Version 4.2.2 Copyright © 2017 vBulletin Solutions, Inc. All rights reserved.