So I have done some research and fixed most of the issues but I can't find out why this is giving me a Notice: Undefined index: in Line 344
If you guys have any suggestion it would be greatly appreciated :D
Here is my Array:
$quote = array(
1 => array(
"quote" => 'The early bird gets the worm, but the second mouse gets the cheese...',
"name" => 'Stephen Wright'
),
2 => array(
"quote" => 'Your time is limited, so dont waste it living someone elses life.',
"name" => 'Steve Jobs'
),
3 => array(
"quote" => 'When one door closes, another one opens. Or you could jut re-open the closed door. Because thats how doors work.',
"name" => "Anon."
),
4 => array(
"quote" => "The two most important days in your life are the day you are born and the day you find out why.",
"name" => "Mark Twain"
),
5 => array(
"quote" => "Before you criticize someone, you should walk a mile in their shoes, that way when you criticize them, you're a mile away and you have their shoes.",
"name" => "Anon."
),
);
$random=array_rand($quote,1);
And my output: [This is line 344]
<?php
echo $quote[$random[0]]
?>