Welcome Guest, Not a member yet? Register   Sign In
array
#3

[eluser]georgerobbo[/eluser]
I'm trying to achieve an array containing the quote and the author with multiple quotes and then generating a random quote using the rand() function.

I have a structure,
Code:
<?php $quote[] = array ( 'author' => 'Doug Larson', 'quote' => 'Life expectancy would grow by leaps and bounds if green vegetables smelled as good as bacon.'); ?>

<?php $quote[] = array ( 'author' => 'G.K. Chesterton', 'quote' => 'The trouble with always trying to preserve the health of the body is that it is so difficult to do without destroying the health of the mind.'); ?>

Is there a better way of structuring this array?


Messages In This Thread
array - by El Forum - 09-12-2009, 10:53 AM
array - by El Forum - 09-12-2009, 11:03 AM
array - by El Forum - 09-12-2009, 11:10 AM
array - by El Forum - 09-12-2009, 11:11 AM
array - by El Forum - 09-12-2009, 12:41 PM
array - by El Forum - 09-12-2009, 02:52 PM



Theme © iAndrew 2016 - Forum software by © MyBB