Login   Register  
PHP Classes
elePHPant
Icontem

File: serial_sample.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Joshua hatfield  >  floMessages  >  serial_sample.php  >  Download  
File: serial_sample.php
Role: Example script
Content type: text/plain
Description: Example using a serial input
Class: floMessages
Generate random texts from multiple message lists
Author: By
Last change:
Date: 8 years ago
Size: 294 bytes
 

Contents

Class file image Download
<?
// This example goes with the serial.txt file.
include("floMessages.php");
$msg unserialize(file_get_contents("serial.txt"));
$adjective $msg->get("adjective");
$a preg_match("/^[aeiouAEIOUhH]/"$adjective)?"an":"a";
echo(
"Do you have $a $adjective ".$msg->get("noun")."?");
?>