Cú pháp hiển thị giá trị mảng:
do {
// statement1
// statement2
...
n
} while(yourCondition);
Ví dụ
<!DOCTYPE html> <html> <body> <?php
$values = array('John', 'David', 'Mike', 'Sam', 'Carol');
$i = 0;
$len = count($values);
do {
echo $values[$i], " ";
$i++;
} while($i < $len);
?> </body> </html>
Kết quả
John David Mike Sam Carol