Mega Code Archive

 
Categories / Php / Operator
 

Using pre- and postincrement

<?php $test=1; echo "Preincrement: ".(++$test); echo "<BR>"; echo "Value afterwords: ".$test; echo "<BR>"; $test=1; echo "Postincrement: ".($test++); echo "<BR>"; echo "Value afterwords: ".$test; ?>