How to use for loop, while loop in AIX ksh ?

While loop in ksh

Set the variable index i value followed by while condition and then do execute following statements and then increment the index

#!/usr/bin/ksh

i=0

while [[ $i -le 50 ]]; do
        ping -c 3 logger
        i=` expr $i + 1`                         ## Space is mandatory here
done


Infinite while loop

#!/usr/bin/ksh
while :
do
        echo "hello"
done