Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

PHP > Get Random String Function

DZone's Guide to

PHP > Get Random String Function

·
Free Resource
// Simple static function for retrieving random quotes. I used this on the first version of my website http://ericfickes.com/v1/



   Keeping it real since I can remember", 

		"Eric Fickes -> No worries, Skull and Crossbones", 

		"Eric Fickes -> Own it like you bought it.  Spank it like you made it.", 

		"Eric Fickes -> Of course it's slow.  It's a ridiculous query!", 

		"Eric Fickes -> Remember when Radio Shack was the bomb?", 

		"Eric Fickes -> Of course it's slow.  It's a ridiculous query!", 

		"Eric Fickes -> What's five and five?!?!?", 

		"Eric Fickes -> Of course it's slow.  It's a ridiculous query!"
	);

	return $aQuotes[ rand( 0, count($aQuotes)-1 ) ];
}

?>
Topics:

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

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.

X

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

{{ parent.tldr }}

{{ parent.urlSource.name }}