Site menu

CodeCook.io

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

PHP - Loop while condition is true

Execute block of code while a condition is true.

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

documentation

while ({{condition}}) {
  {{body}}
}
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
  • Do loop while a condition is true
  • Break out of loop

Other language

  • Scala
  • Ruby

Random task

  • Repeat string
  • Set computer name
  • Single comment
  • Show docker container standard output
  • Show 32 or 64 bit operating system
  • Blog
  • About
  • License