PHP code for bundling multiple sites


This PHP code show how easy it is to embed links for on-the-fly site consolidation.

$usefullinks = array (
	"Link 1"	=> "http://domain1.com/",
	"Link 2"	=> "http://domain2.com/",
	"Link 3"	=> "http://domain2.com/",
	"Link 4"	=> "http://domain4.com/",
	"Link 5"	=> "http://domain5.com/",
	"Link 6"	=> "http://domain6.com/",
);
$links2tabsparameters = "";
$links2tabsindex = 0;
foreach ( $usefullinks as $caption => $link ) {
	$links2tabsindex++;
	$links2tabsparameters .= "&url" . $links2tabsindex . "=" . urlencode ( $link ) . 
		"&caption" . $links2tabsindex . "=" . urlencode ( $caption );
}
echo '<a href="http://brief.ly/links2tabs/?toc=' . $links2tabsparameters .
	'" target="_blank">All-in-one-click</a>';

Additional notes

Open all references in tabs: [1 – 4]


Short link: [Facebook] [Twitter] [Email] Copy - http://name.ly/~RoED$Jn