note 21971 added to function.get-defined-functions

From: Date: Sun, 02 Jun 2002 14:28:51 +0000
Subject: note 21971 added to function.get-defined-functions
Groups: php.notes 
Request: Send a blank email to php-notes+get-31341@lists.php.net to get a copy of this message
Here's a useful trick with the get_defined_functions function - show all available functions with a link to the documentation (you can even change the mirror it goes to): <?php // the php mirror $php_host = "http://us2.php.net/"; // the number of cols in our table $num_cols = 3; $ar = get_defined_functions(); $int_funct = $ar[internal]; sort($int_funct); $count = count($int_funct); ?> <html> <head> <title> Available PHP Functions </title> </head> <body> <p> <?php print $count; ?> functions available on <?php print $_SERVER[SERVER_NAME]; ?> (<a href="<?php print $php_host;?>" target="phpwin">php</a> version <?php print phpversion(); ?>) </p> <table align="center" border="2"> <tr> <?php for($i=0;$i<$count;$i++) { $doc = $php_host . "manual/en/function." . strtr($int_funct[$i], "_", "-") . ".php"; print " <td><a href=\"" . $doc . "\" target=\"phpwin\">" . $int_funct[$i] . "</a></td>\n"; if(($i > 1) && (($i+$num_cols)%$num_cols==($num_cols-1))) print " </tr>\n <tr>\n"; } for($i=($num_cols-($count%$num_cols));$i>0;$i--) print " <td>&nbsp;</td>\n"; ?> </table> </body> </html> -- http://www.php.net/manual/en/function.get-defined-functions.php http://master.php.net/manage/user-notes.php?action=edit+21971 http://master.php.net/manage/user-notes.php?action=delete+21971 http://master.php.net/manage/user-notes.php?action=reject+21971

« previous php.notes (#31341) next »