Array 3
Array 3
php
?>
<ul>
</ul>
<?php
$associativeArray = ['Name' => 'John', 'Age' => 25, 'City' => 'New York'];
?>
<dl>
</dl>
<?php
$multidimensionalArray = [
[1, 2, 3],
[4, 5, 6],
[7, 8, 9]
];
?>
<ul>
<li>
<ul>
</ul>
</li>
</ul>
int i = 0;
while (i < 5) {
System.out.println(i);
i++;
int j = 0;
do {
System.out.println(j);
j++;
The main difference between a while loop and a do-while loop is in when the loop condition is
checked:while loop: In a while loop, the condition is checked before the loop body is executed. If the
condition evaluates to false initially, the loop body will not be executed at all.do-while loop: In a do-
while loop, the condition is checked after the loop body is executed. This means that the loop body is
guaranteed to be executed at least once, even if the condition evaluates to false on the first iteration
<?php
if ($denominator != 0) {
} else {
}
// Calling the function
$numerator = 10;
$denominator = 2;
?>