next Posted July 28, 2008 Share Posted July 28, 2008 I have a really strange problem, here's my code: <?php include('config/config.php'); include('lib/database.class.php'); //Database::connect(); try { $result = Database::query("CALL index_page_forum_info('general')", PDO::FETCH_ASSOC); echo print_r($result); foreach($result as $key => $row) echo '<br />' . $row['forum_title']; } catch(PDOException $e) { trigger_error($e->getMessage(), E_USER_ERROR); } ?> here's my output: Array ( [forum_id] => 1 [forum_title] => Upcoming Movies [forum_descr] => Discuss upcoming movies and film not yet in theatres here. [num_threads] => 1 [num_comments] => 0 ) 1 1 U D 1 0 I don't get it, how come my array contains all the necessary data, but outputs only first letter through "foreach" loop? Can anybody help? Thanks. Link to comment https://forums.phpfreaks.com/topic/117049-solved-query-returns-only-first-letter/ Share on other sites More sharing options...
mattbeswick Posted July 29, 2008 Share Posted July 29, 2008 Hi, I've got the same issue... how did you solve this? [edit] If anyone has a solution, feel free to post [/edit] Thanks, Matt Link to comment https://forums.phpfreaks.com/topic/117049-solved-query-returns-only-first-letter/#findComment-603036 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.