• « Type Operators
  • Introduction »
  • PHP 4 Manual
  • Language Reference
  • Control Structures
Edit Report a Bug GitHub logo

Control Structures

Table of Contents

  • Introduction
  • if
  • else
  • elseif/else if
  • Alternative syntax for control structures
  • while
  • do-while
  • for
  • foreach
  • break
  • continue
  • switch
  • declare
  • return
  • require
  • include
  • require_once
  • include_once
  • goto
  • Other versions of this page
    • PHP 4
    • PHP 5
    • PHP 7 (php.net)
    • PHP 8 (php.net)
Legacy manuals maintained by Home
  • Get help migrating a legacy app
  • Extend PHP support for EOL versions