Over a million developers have joined DZone.

Random Quotes

DZone's Guide to

Random Quotes

Free Resource
Called as quotes.php it will display a single random quote.  Called as quotes.php?all=1 it will display all quotes in an unordered list.  No database is required, and it should be fairly obvious how to add new quotes.

        for($i=0; $i<=count($quotes)-1; $i++) {
                echo "
  • ".$quotes[$i]."
  • "; } echo ""; } else { srand ((double) microtime() * 1000000); $randomquote = rand(0,count($quotes)-1); echo $quotes[$randomquote]; } ?>

    Opinions expressed by DZone contributors are their own.


    Dev Resources & Solutions Straight to Your Inbox

    Thanks for subscribing!

    Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.


    {{ parent.title || parent.header.title}}

    {{ parent.tldr }}

    {{ parent.urlSource.name }}