<?php $i = 1; while ($i < 3) { $_SESSION["var_num_$i"] = $i ; $i++; } echo $_SESSION["var_num_1"]; ?>