Home > Backend Development > PHP Tutorial > PHP built-in function usage examples, PHP built-in examples_PHP tutorial

PHP built-in function usage examples, PHP built-in examples_PHP tutorial

WBOY
Release: 2016-07-13 10:02:06
Original
1108 people have browsed it

php built-in function usage examples, php built-in examples

The examples in this article describe the usage of php built-in functions. Share it with everyone for your reference. The specific analysis is as follows:

In PHP, you can embed a function inside the function, and the calling scope is limited to the function itself

<&#63;php
function msg()
{
  echo("<center><h2>Displaying even
  numbers</h2></center><p><p>");
  function displayeven()
  {
   $ctr=0;
   echo("<font size=4>");
   for($i=2;$i<=100;$i+=2)
   {
     echo("$i    ");
     $ctr++;
     if($ctr%10==0)
     {
      echo("<p>");
     }
   }
   echo("</font>");
  }
}
msg();
displayeven();
&#63;>
Copy after login

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/970982.htmlTechArticlePHP embedded function usage examples, php built-in examples This article describes the usage of php built-in functions. Share it with everyone for your reference. The specific analysis is as follows: In php, you can embed a function inside the function...
Related labels:
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