View Single Post
04-15-2009, 08:06 PM
Join Date: Feb 2009
Location: New York
Got a newbie and embarrassing question....
I thought that the ++ would add 1 to a number? Like so:
$test = 1; $test2 = $test++; echo "OUTPUT: $test2";
The output is still 1. I thought that the output should be 2?
Is the only way to use the ++ is in loops?
I thought that the ++ was a quick way to add "1" without having to do this:
$test2 = ($test + 1);
View Public Profile
Send a private message to allworknoplay
Find More Posts by allworknoplay