<p>How do you write the syntax for a While loop?</p>

<h2>C<code>#</code></h2>

<pre><code>int i = 0; 
while (i != 10)
{ 
   Console.WriteLine(i); 
   i++; 
}
</code></pre>

<h2>VB.Net</h2>

<pre><code>Dim i As Integer = 0
While i &lt;&gt; 10
    Console.WriteLine(i)
    i += 1
End While  
</code></pre>

<h2>PHP</h2>

<pre><code>&lt;?php
while(CONDITION)
{
//Do something here.
}
?&gt;


&lt;?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'];
//...
}
?&gt;
</code></pre>

<h2>Python</h2>

<pre><code>i = 0
while i != 10:
    print i
    i += 1
</code></pre>

[{'answer_id': 42409, 'author': 'UnkwnTech', 'author_id': 115, 'author_profile': 'https://Stackoverflow.com/users/115', 'pm_score': 4, 'selected': True, 'text': '<p>In PHP a while loop will look like this:</p>\n\n<pre><code>&lt;?php\nwhile(CONDITION)\n{\n//Do something here.\n}\n?&gt;\n</code></pre>\n\n<p>A real world example of this might look something like this</p>\n\n<pre><code>&lt;?php\n//MySQL query stuff here\n$result = mysql_query($sql, $link) or die("Opps");\nwhile($row = mysql_fetch_assoc($result))\n{\n$_SESSION[\'fName\'] = $row[\'fName\'];\n$_SESSION[\'lName\'] = $row[\'lName\'];\n//...\n}\n?&gt;\n</code></pre>\n'}, {'answer_id': 42420, 'author': 'Blair Conrad', 'author_id': 1199, 'author_profile': 'https://Stackoverflow.com/users/1199', 'pm_score': 3, 'selected': False, 'text': '<p>There may be a place for this type of question, but only if the answer is correct. <code>While</code> isn\'t a keyword in C#. <code>while</code> is. Also, the space between the <code>!</code> and <code>=</code> isn\'t valid. Try:</p>\n\n<pre><code>int i=0; \nwhile (i != 10)\n{ \n    Console.WriteLine(i); \n    i++; \n}\n</code></pre>\n\n<p>While I\'m here, <a href="/questions/tagged/python">Python</a>:</p>\n\n<pre><code>i = 0\nwhile i != 10:\n    print i\n    i += 1\n</code></pre>\n'}, {'answer_id': 1134686, 'author': 'SingleNegationElimination', 'author_id': 65696, 'author_profile': 'https://Stackoverflow.com/users/65696', 'pm_score': 0, 'selected': False, 'text': '<h2>TCL</h2>\n\n<pre><code>set i 0\nwhile {$i != 10} {\n    puts $i\n    incr i\n}\n</code></pre>\n\n<p>C++, C, JavaScript, Java and a myriad of other C-like languages all look exactly the same as C#, except in the way that they write the output to the console, or possibly the way you create the variable <code>i</code>.  Answering that would belong in some other question.</p>\n'}]
['https://Stackoverflow.com/questions/42395', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1048/']