note 109440 deleted from function.array-walk by danbrown

From: Date: Tue, 17 Jul 2012 17:44:29 +0000
Subject: note 109440 deleted from function.array-walk by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-189267@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 ) ); ?>

« previous php.notes (#189267) next »