PHP Classes

File: example3.php

Recommend this page to a friend!
  Classes of Giulio Bai   AcronymIT   example3.php   Download  
File: example3.php
Role: Example script
Content type: text/plain
Description: Example #3
Class: AcronymIT
Locate and process acronyms within text phrases
Author: By
Last change:
Date: 17 years ago
Size: 692 bytes
 

Contents

Class file image Download
<?php

include_once('acronymIT.php');

$acronymit = new AcronymIT();

$acronymit->add_acronym("LOL", "Lough Out Loud");
$acronymit->list_acronyms(); // Default file with LOL, Laugh Out Loud added

$acronymit->rm_acronym($LOLid);
$acronymit->list_acronyms(); // Default file without LOL, Lough Out Loud

$acronymit->add_acronym("LOL", "Lot Of Laughs");
$acronymit->list_acronyms(); // Default file with LOL, Lot Of Laughs added

$acronymit->set_file("another/file.dat");
$acronymit->list_acornyms(); // Changing the file: LOL does not exist now

$acronymit->add_acronym("LOL", "Laugh Out Loud");
$acronymit->list_acronyms(); // So let's add it again to the new file!

?>