Your $digit variable is the maximum, use it that way.
Change your for loop in this
for ($x= 1; $x <= $digit; $x++) {
echo 'Hello ' . $x. '<br />';
}
Then you will get what you want.
solved Input numeric text for # loops [closed]
Your $digit variable is the maximum, use it that way.
Change your for loop in this
for ($x= 1; $x <= $digit; $x++) {
echo 'Hello ' . $x. '<br />';
}
Then you will get what you want.
solved Input numeric text for # loops [closed]