laith jasser Posted March 27, 2013 Share Posted March 27, 2013 PHP for the Web, Fourth Edition page 186 script 7.4 continue i find mistakes for foreach ($books as $key => $value) { print "<p>$key: $value</p>\n"; } it need print_r solution foreach ($book as $key => $value) { print $key; print_r($value); } Link to comment Share on other sites More sharing options...
Antonio Conte Posted March 27, 2013 Share Posted March 27, 2013 Print_r() is dubug functionality. Don't use it in production code. That code looks good to me btw. Welcome to the forum, btw. Link to comment Share on other sites More sharing options...
laith jasser Posted March 27, 2013 Author Share Posted March 27, 2013 thanks... i tried to do that without print_r, but I falied and where the btw forum .. please send me the link ... Link to comment Share on other sites More sharing options...
Antonio Conte Posted March 27, 2013 Share Posted March 27, 2013 Haha. This is the forum. Again, welcome. That code should definitely work. What's in the variable $books for you? Link to comment Share on other sites More sharing options...
Recommended Posts