How do you write the syntax for a While loop?
C#
int i = 0;
while (i != 10)
{
Console.WriteLine(i);
i++;
}
VB.Net
Dim i As Integer = 0
While i <> 10
Console.WriteLine(i)
i += 1
End While
PHP
<?php
while(CONDITION)
{
//Do something here.
}
?>
<?php
//MySQL query stuff here
$result = mysql_query($sql, $link) or die("Opps");
while($row = mysql_fetch_assoc($result))
{
$_SESSION['fName'] = $row['fName'];
$_SESSION['lName'] = $row['lName'];
//...
}
?>
Python
i = 0
while i != 10:
print i
i += 1