Displaying Random Text/Quotes from an Array

Category: Software and Systems Engineering
Author: Sean O'Donnell
Thu, Feb. 20th, 2003 @ 2:20:22 (MST)

This simple example shows how to return random text/quotes from an array using Server-Side (PHP) Scripting

<?php
$list_item 
= array("This is a Quote Example","This is also a Quote Example");
print 
$list_item[array_rand($list_item,1)];
?>

The function above should only return one random quote.

Copyleft (<) 1998-2019 www.seanodonnell.com