Home > Backend Development > PHP Tutorial > Examples of usage of foreach statement in php array

Examples of usage of foreach statement in php array

WBOY
Release: 2016-07-25 08:59:17
Original
957 people have browsed it
  1. $arr=array("one","two","three","four");
  2. foreach ($arr as $value){
  3. echo $value."< br>";
  4. }
  5. ?>
Copy code

Output results one two three four

For the usage of foreach, please refer to: http://bbs.it-home.org/w3school/php/php_looping.html.



source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template