php while循环控制实例讲解,while实例讲解
while循环是PHP中最简单的循环,其基本格式为:
while (expr){ statement }
或者
while (expr): statement endwhile;
该语法表示,只要expr表达式为TRUE,那么就一直执行statement直到expr为FALSE为止,statement表示要执行的动作或逻辑。
<?php $i = 1; while ($i <= 10) { echo $i; $i++; } ?>
该例子循环输出1到10。
原文地址:http://www.manongjc.com/php/php_while.html
php相关阅读:
php strrpos() 函数区分大小写的查找字符串在另一字符串中最后一次出现的位置
php strripos() 函数查找字符串在另一字符串中最后一次出现的位置
php strpos() 函数查找字符串在另一字符串中第一次出现的位置
php stripos() 查找字符串在另一字符串中第一次出现的位置
php stripslashes() 函数删除、过滤字符串中的反斜杠
php stripcslashes() 函数删除由 addcslashes() 函数添加的反斜杠
php strip_tags() 函数过滤字符串中的html和XML标签/元素

Hot AI Tools

Undresser.AI Undress
AI-powered app for creating realistic nude photos

AI Clothes Remover
Online AI tool for removing clothes from photos.

Undress AI Tool
Undress images for free

Clothoff.io
AI clothes remover

Video Face Swap
Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Hot Tools

VSCode Windows 64-bit Download
A free and powerful IDE editor launched by Microsoft

Atom editor mac version download
The most popular open source editor

ZendStudio 13.5.1 Mac
Powerful PHP integrated development environment

MinGW - Minimalist GNU for Windows
This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

DVWA
Damn Vulnerable Web App (DVWA) is a PHP/MySQL web application that is very vulnerable. Its main goals are to be an aid for security professionals to test their skills and tools in a legal environment, to help web developers better understand the process of securing web applications, and to help teachers/students teach/learn in a classroom environment Web application security. The goal of DVWA is to practice some of the most common web vulnerabilities through a simple and straightforward interface, with varying degrees of difficulty. Please note that this software
