The below code is from a php book, when i run i am getting the message, Notice: Uninitialized string offset: 2
// This function will put all of the matches found into
// the $matches array
preg_match("/\d/", "1 and 2 and 3 and 4", $matches);
// The 0 element of the $matches array holds another
// array of the matches.
echo "Value: " . $matches[0][2] . "\n";
should i have to use print_r instead of echo?