Login   Register  
PHP Classes
elePHPant
Icontem

File: fbcount.test.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Nemanja Avramovic  >  FBCount  >  fbcount.test.php  >  Download  
File: fbcount.test.php
Role: Example script
Content type: text/plain
Description: Example of usage
Class: FBCount
Generate enumerated lists of name
Author: By
Last change:
Date: 6 years ago
Size: 1,058 bytes
 

Contents

Class file image Download
<?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($nizNULL'<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($nizNULL'<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)

?>