Zitat: Unterschied zwischen den Versionen

Zeile 6: Zeile 6:
 
         );
 
         );
  
// Gets the Total number of Items in the array
 
//  Divides by 2 because there is a Quote followed by an Author
 
 
$totalqts = (count($allqts)/2);
 
$totalqts = (count($allqts)/2);
  
// Subtracted 1 from the total because '0' is not accounted for otherwise
 
 
$nmbr = (rand(0,($totalqts-1)));
 
$nmbr = (rand(0,($totalqts-1)));
 
$nmbr = $nmbr*2;
 
$nmbr = $nmbr*2;
 
//$nmbr = 18;
 
  
 
$quote = $allqts[$nmbr];
 
$quote = $allqts[$nmbr];
 
         $nmbr = $nmbr+1;
 
         $nmbr = $nmbr+1;
 
$author = $allqts[$nmbr];
 
$author = $allqts[$nmbr];
 
// You can delete this section
 
//  it is only so Search engines can find it
 
if ($_SERVER['PHP_SELF'] == "/quotes.php") {
 
    echo "<Title>Random Quote Script for PHP</title>";
 
    echo "<meta name=\"Description\" content=\"Random Quote script written in PHP\">";
 
    echo "<meta name=\"keywords\" content=\"Random Quote script written in PHP\">";
 
}
 
/// End Delete
 
 
  
 
$space = "<font color=$bgcolor>.....................................</font>";
 
$space = "<font color=$bgcolor>.....................................</font>";

Version vom 18. November 2021, 01:33 Uhr

....................................."; $comments = "

Random Quote Script by Dave

"; echo "

"; echo ""; echo "$quote
"; echo "
"; echo "$space $author"; echo "$comments"; echo "

"; ?>