I've got a problem with a function who should list all "tweet".
I don't know why there is an error because I used this code previously (3 months) and it work on my other project.

**I'm using PHP 5.4.12**

There is my code:

```
function getTweet()
{
    global $bdd;

    $tweets = $bdd->query("SELECT * FROM tweets");

    foreach($tweets as $tweet){
        echo $tweet['content'];
    }
}

```

There is the error:

> 
> Warning: Illegal string offset 'content' (line 8)
> 
> 
> 

With a print\_r:

> 
> 1Test 1700 
> 
> 
> 

```
1 = id
Test 1 = content
7 = my id
0 = retweet
0 = favourite

```

With this code I have only one result (but there is several results):

```
function getTweet()
{
    global $bdd;

    $tweets[] = $bdd->query("SELECT * FROM tweets");
    foreach($tweets as $tweet){
        echo $tweet['content'];
    }

}

```

With this, I have the type of my vars:

```
<?php 
function getTweet()
{
    global $bdd;

    $tweets = $bdd->query("SELECT * FROM tweets");
    echo gettype($tweets);
    // Return "array"

    foreach($tweets as $tweet){
         echo gettype($tweet);
         // Return "integerstringintegerintegerinteger"
    }

}

```

?>