PHP Classes

File: serial_sample.php

Recommend this page to a friend!
  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: 18 years ago
Size: 294 bytes


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