HTML Logo by World Wide Web Consortium (www.w3.org). Click to learn more about our commitment to accessibility and standards.

Organised Quote System

Login / Search

 [ Join | More ]
 Add topic 
Posted
Rating:
#997 (In Topic #244)
Avatar

Organised Quote System

Originally posted by start.php+–></div><table border='0' align='center' width='95%' cellpadding='3' cellspacing='1'><tr><td>QUOTE (start.php)</td></tr><tr><td id='QUOTE'>// Quote
if ($is_on_quote==1)
{
   $selectquote=get_random_line("text/quotes.txt");

   if (trim($selectquote) == "Something_A") { put_in_table(get_random_line("text/quotes_something_a.txt"),
"width='100%'",0,"Random Something_A Quote"); }
   if (trim($selectquote) == "Something_B") { put_in_table(get_random_line("text/quotes_something_b.txt"),
"width='100%'",0,"Random Something_B Quote"); }
   if (trim($selectquote) == "Something_C") { put_in_table(get_random_line("text/quotes_something_c.txt"),
"width='100%'",0,"Random Something_C Quote"); }
   echo "
";
}
(^^ might be a good idea to have each { } on one line… ;))

<!–QuoteBegin-quotes.txt
Something_A
Something_B
Something_C
Something_A
Something_B
Something_C
Something_A
Something_B
Something_C


You could just add one of each if you want, but the more there are seems to make it even more random… :dry:

Think of it like this: Picking one person from a group of 2 people at random. Picking one person from a group of 20 people at random. :)


ocProducts :wub: :wub:

Click here to drop by my website!
Back to the top
 
1 guests and 0 members have just viewed this: None
Control functions:

Quick reply   Contract

Your name:
Your message: