{"id":73,"date":"2010-06-10T23:47:31","date_gmt":"2010-06-10T23:47:31","guid":{"rendered":"http:\/\/soliloquyforthefallen.net\/blog\/?p=73"},"modified":"2015-03-05T07:20:56","modified_gmt":"2015-03-05T07:20:56","slug":"random-quotes-on-page","status":"publish","type":"post","link":"https:\/\/soliloquyforthefallen.net\/?p=73","title":{"rendered":"Random Quotes on Page"},"content":{"rendered":"<p>I&#8217;ve converted my homepage to php.  This has the benefit of maintaining standard HTML interaction, while allowing me to script certain things into my page.  I wrote this because I hate java and java script with a passion.  I blame it on my college&#8217;s use of blackboard.  Its enough to make any one think twice.<\/p>\n<p><!--more--><br \/>\nFor instance, if you will look at the bottom of my page, you will see a random quote appear.  Here&#8217;s the code, which is really the whole reason for my making this post:<\/p>\n<pre escaped=\"true\" lang=\"PHP\">\n&lt;?php\n$quote_number = rand(0, 2);\n$quotes = array( \"A strange game. The only winning move is not to play. How about a nice game of chess?\",\n\"We are the knights who say \"Ni!\" \",\n\"Umm, I'm a cucumber!\" );\necho \"{$quotes[$quote_number]}\";\n?&gt;<\/pre>\n<p>Respectively, <em>WarGames, Monty Python and the Holy Grail,<\/em> and <em>Larry the Cucumber<\/em><\/p>\n<p>There&#8217;s not much to say about the code, I think it is fairly self explanatory.<\/p>\n<p>The first line generates a random variable between 0 and 2.  This is really quotes 1 -3.  If you add more quotes, you need to add increase the number.<\/p>\n<p>The second line is an array holding the quotes.  The third line outputs the quote.  Wrap it in &lt;p&gt; tags and you&#8217;re golden.<\/p>\n<p>Next up is getting ahold of the latest twitter post I make and displaying it on my homepage . . . .<\/p>\n","protected":false},"excerpt":{"rendered":"<p>I&#8217;ve converted my homepage to php. This has the benefit of maintaining standard HTML interaction, while allowing me to script certain things into my page. I wrote this because I hate java and java script with a passion. I blame it on my college&#8217;s use of blackboard. Its enough to make any one think twice&#8230;. <\/p>\n<div class=\"read-more navbutton\"><a href=\"https:\/\/soliloquyforthefallen.net\/?p=73\">Read More<i class=\"fa fa-angle-double-right\"><\/i><\/a><\/div>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[117],"tags":[],"_links":{"self":[{"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/posts\/73"}],"collection":[{"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=73"}],"version-history":[{"count":1,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions"}],"predecessor-version":[{"id":775,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=\/wp\/v2\/posts\/73\/revisions\/775"}],"wp:attachment":[{"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=73"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=73"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/soliloquyforthefallen.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=73"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}