note 109441 deleted from function.phpinfo by danbrown
| From: | danbrown@php.net | Date: | Tue, 17 Jul 2012 17:44:38 +0000 |
| Subject: | note 109441 deleted from function.phpinfo by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-189268@lists.php.net to get a copy of this message | ||
Note Submitter: m_ocx at yahoo dot com
----
<?php
// This is a sample code to suggest same website URL
// with other extensions using the pathinfo
// pathinfo improved
function suggest( $domain )
{
$extensions = array (".com" , ".net" , ".org" , ".info" ,
".co.uk");
$info = pathinfo ( $domain );
$info["filename"];
array_walk ( $extensions , 'build' , $info["filename"]);
}
function build ( $ext , $id , $domain )
{
echo $domain . ":" . $ext . "<br />";
}
$mysite = "http://www.gchats.com";
print_r ( suggest ( $mysite ) );
?>