<?php
$numbers = [3, 5, 8, 12, 7];
$i = 0;

do {
    echo "عدد بررسی شده: " . $numbers[$i] . "<br>";
    $i++;
} while ($i < count($numbers) && $numbers[$i - 1] <= 10);
?>