Home  >  Article  >  Backend Development  >  How to use php's built-in functions?

How to use php's built-in functions?

怪我咯
怪我咯Original
2017-07-06 10:39:011159browse

This article mainly introduces the usage of phpembeddedfunction. It analyzes the calling methods and usage techniques of php embedded functions with examples. It has certain reference value. Friends in need You can refer to the following

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, a function can be embedded inside the function, and the calling scope is limited to the function itself

<?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();
?>

The above is the detailed content of How to use php's built-in functions?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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