Hi! is it possible to put a do while loop in a do while loop?

For eg:


DO{

CODES
DO{
}
while
}
while

Recommended Answers

All 2 Replies

Yes:

$i=0;
$j=0;
do{
  do{
   echo $i . " " . $j;

  }while(++$j<10);
}while( ++$i < 10);

thanks for share this great info.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.