Jump to content

[SOLVED] query returns only first letter.


next

Recommended Posts

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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.