hi to the community
I' trying to do anything like :
$begin = 5 ;
$end = 7;
for ($i=$begin ; $i <= $end ; $i++){
echo "<br>".$i ;
}
That is correct and the output is
5
6
7
Now the matter : I have to do different operations
with each values of the variable $i .
So I try :
$begin = 5 ;
$end = 7;
for ($i=$begin ; $i <= $end ; $i++){
echo "<br>".$i ;
if ($i = $begin){
//do anything
}
}
Here it is incorrect and generate a loop or the script block.
How can I put a condition for each value of $i ??
Any help appreciated....thanks a lot.