Login   Register  
PHP Classes
elePHPant
Icontem

File: testSmileys.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of L  >  Smileys  >  testSmileys.php  >  Download  
File: testSmileys.php
Role: Example script
Content type: text/plain
Description: example script
Class: Smileys
This class replaces smiley tags with smiley images
Author: By
Last change:
Date: 12 years ago
Size: 422 bytes
 

Contents

Class file image Download
<html>
<body>
<?php

require "Smileys.php";

$class = new Smileys("smileys.txt");

$smileys $class->getSmileys();

echo 
$class->insertSmileys("A Doom trooper: :trooper:<p>\n");
echo 
"<table border=1>\n\t";
for(
$i 0$i sizeof($smileys); $i++) {
    echo 
"<tr>\n\t\t<td>" $smileys[$i][0] . "</td><td><img src=\"" $smileys[$i][1] . "\"></td>\n\t</tr>";
}
echo 
"</table>\n";

?>
</body>
</html>