PHP built-in function usage example code

怪我咯
Release: 2023-03-13 19:20:02
Original
1090 people have browsed it

The so-called PHP built-in functions are functions that have been defined in the library of the PHP program, such as echo, mysql_connect, include_once, etc., just like VC++ The system functions inside are the same, such as cout, etc.

This article mainly introduces the usage of phpembeddedfunctions, and analyzes the calling methods and usage techniques of php embedded functions with examples, which has certain reference value. Friends in need can refer to it. 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();
?>
Copy after login

The above is the detailed content of PHP built-in function usage example code. For more information, please follow other related articles on the PHP Chinese website!

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
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!