Site menu

CodeCook.io

  • Languages
    • C
    • C++
    • CSS
    • Git
    • HTML
    • Java
    • JavaScript
    • jQuery
    • PHP
    • Python
    • Ruby
    • Scala
  • loop
  • while

PHP - Do loop while a condition is true

Execute a code block and continue executing same loop while condition is true. Code block is always executed even when condition is false.

0
436
  • Share on Facebook
  • Share on Google+
  • Share on Twitter

documentation

do {
  {{body}}
} while ({{condition}});
php

Notes

last update: Dec. 4, 2014

Advertisement

This project is hosted on DigitalOcean, try it and support us

Related concept

  • For each loop
  • Counter loop
  • Loop until condition is true
  • Loop while condition is true
  • Break out of loop

Other language

  • Scala
  • Python
  • Ruby

Random task

  • Add user to group
  • For each loop
  • Sort objects by function
  • Show docker container standard output continiously
  • Stop docker container
  • Blog
  • About
  • License