I have checked for loop these two ways, but given same output:
1: Increment use ++$i
for($i=0; $i<10; ++$i){
echo $i;
}
2: Increment use $i++
for($i=0; $i<10; $i++){
echo $i;
}
These both code gave this output:
0 1 2 3 4 5 6 7 8 9
We learn ++$i mean pre increment, $i++ mean post increment,
why that post and pre increment not work? can someone please explain me? thank you.