Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

php increment variable

$var = 0;
// use value (0) THEN increment by one
$var++;
// increment by one THEN use value (1)
++$var;

// aside: increment by custom amount (1 emulates the above)
$var += 1;
$var += $amount;
 
PREVIOUS NEXT
Tagged: #php #increment #variable
ADD COMMENT
Topic
Name
3+6 =