How to correctly implement PHPfunction function extension. In this article, we will introduce in detail the sample code for PHPfunction function extension :? Phpfunctionchoose ($ name, $ id, $ task) {global $ db_link; ...... return $ xx ;}? In this article, we will introduce you in detail.
PHP function extension code example:
- <? Php
- Function choose ($ name, $ id, $ task ){
- Global $ db_link;
- .....
- Return $ xx;
- }
- ?>
On the called page, it is often $ tmp = choose ($ name, $ id, $ task );
Another PHP function extension method is:
- < ?php
- function choose($name,$id,
$task,$instance=0){
- global $db_link;
- .....
- return $xx;
- }
- ?>
The usage of this function is no different from that of the normal operation, but when we do not input $ instance, as shown in
$ Array = choose ($ name, $ id, $ task );
It is handled by default $ instance = 0. when we need $ instance for PHP function extension, the page we call can be written as follows:
$ Instance = "...";
$ Array = choose ($ name, $ id, $ task, $ instance)
Example code of function extension for using PHP functions :? Php functionchoose ($ name, $ id, $ task) {global $ db_link; ...... return $ xx ;}? In the tune...