<?php
require_once "fbcount.class.php";
//basic counting
$niz = array('Webinsane','CubeScripts');
echo '<p>' . FBCount::asString($niz) . '</p>';
//localization
$niz = array('Nemanja', 'Filip', 'Marko');
echo '<p>' . FBCount::asString($niz, 'i') . '</p>';
//link every item
$niz = array('Nemanja', 'Filip', 'Marko');
echo '<p>' . FBCount::asString($niz, NULL, '<a href="http://google.com/search?q=%1$s" target="_blank">%1$s</a>') . '</p>';
// ^^ for description of FORMAT (third parameter) take a look at http://www.php.net/sprintf
//associative array with linking
$niz = array('Webinsane'=>'http://www.webinsane.com/', 'InterestingFacts'=>'http://www.interestingfacts.org/', 'CubeScripts'=>'http://www.cubescripts.com/');
echo '<p>' . FBCount::asString($niz, NULL, '<a href="%2$s" target="_blank">%1$s</a>') . '</p>';
// ^^ for description of FORMAT (third parameter) take a look at http://www.php.net/sprintf
// when using associative arrays, key is first parameter for sprintf function (thus %1$s) and value is second (%2$s)
?>
|