PHP Version
4+
$i = 1;

do { /* Code block ({}) */
    // Execute the code block first, then evaluate the condition
    echo $i . ' ';
    $i++;
} while ($i <= 5); // Repeat the code block if the condition is true

// Output: 1 2 3 4 5
do {
    code block
} while (condition);
$i = 1; // Initialize the variable $i to 1

do {
    echo $i . ' '; // Output the current value of the variable $i
    $i++; // Increment the value of the variable $i by 1
} while ($i <= 5);

// Output: 1 2 3 4 5
$i = 1;

do {
	if ($i == 3) { // Terminate the loop if $i is 3
		break;
	}

    echo $i . ' ';
    $i++;
} while ($i <= 5);

// Output: 1 2
$i = 1;

do {
	if ($i == 3) {
		$i++; // Increment $i to prevent an infinite loop
		continue; // Skip the current iteration and move to the next iteration
	}

    echo $i . ' ';
    $i++;
} while ($i <= 5);

// Output: 1 2 4 5