Title: Error with PHP?
Last modified: August 21, 2016

---

# Error with PHP?

 *  Resolved [pdaniel](https://wordpress.org/support/users/pdaniel/)
 * (@pdaniel)
 * [12 years, 9 months ago](https://wordpress.org/support/topic/error-with-php/)
 * New to WordPress and PHP so I apologize if this is an easy one. Tried to implement
   the Kebo twitter into my html document with the following code and I got the 
   below error message:
 *  <div class=”content-wrap”>
    <?php $tweets = kebo_twitter_get_tweets(); ?> <?
   php $i = 0; ?> <?php foreach ($tweets as $tweet) : ?> <?php echo $tweet->text;?
   > <?php if ( ++$i == 10 ) break; ?> <?php endforeach; ?> </div>
 * Warning: Invalid argument supplied for foreach() in D:\Hosting\2780066\html\wp-
   content\themes\rapscallion\footer.php on line 41
 * Any help would be appreciated!
    Thanks.
 * [http://wordpress.org/plugins/kebo-twitter-feed/](http://wordpress.org/plugins/kebo-twitter-feed/)

Viewing 2 replies - 16 through 17 (of 17 total)

[←](https://wordpress.org/support/topic/error-with-php/?output_format=md) [1](https://wordpress.org/support/topic/error-with-php/?output_format=md)
2

 *  Thread Starter [pdaniel](https://wordpress.org/support/users/pdaniel/)
 * (@pdaniel)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/error-with-php/page/2/#post-3995536)
 * Ok, I’ll give it a shot. For kicks I plugged in the following code and the else
   part came back which tells me the data coming back is not in array form maybe??
   I checked again with the $tweets = kebo_twitter_get_tweets();
    print_r($tweets);
 * and the tweets are coming back ok. I see them fine.
 * code:
    <?php $tweets = kebo_twitter_get_tweets(); ?>
 * <?php $i = 0; ?>
 * <?php if (is_array($tweets)) : ?>
 *  <?php foreach ($tweets as $tweet) : ?>
 *  <?php echo $tweet->text; ?>
 *  <?php if (++$i == 10) break; ?>
 *  <?php endforeach; ?>
 * <?php else : ?>
 *  <p>Sorry, no Tweets found.</p>
 * <?php endif; ?>
 *  Plugin Author [Peter Booker](https://wordpress.org/support/users/peterbooker/)
 * (@peterbooker)
 * [12 years, 8 months ago](https://wordpress.org/support/topic/error-with-php/page/2/#post-3995537)
 * Hi pdaniel,
 * Thanks for coming back to us. The other problems like this have been character
   encoding issues and the data gets cut off at the bad character, so that when 
   it comes to using it, it is not decoded properly and is not a properly formed
   array.
 * If you can install the above version of the plugin I mentioned above, it will
   let me see the data directly and I can see if it is the above problem or if there
   is another issue we need to fix.
 * I really appreciate you taking the time to help us debug this issue, it really
   helps us to improve the plugin, thanks again!

Viewing 2 replies - 16 through 17 (of 17 total)

[←](https://wordpress.org/support/topic/error-with-php/?output_format=md) [1](https://wordpress.org/support/topic/error-with-php/?output_format=md)
2

The topic ‘Error with PHP?’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/kebo-twitter-feed_00aced.svg)
 * [Kebo Twitter Feed](https://wordpress.org/plugins/kebo-twitter-feed/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/kebo-twitter-feed/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/kebo-twitter-feed/)
 * [Active Topics](https://wordpress.org/support/plugin/kebo-twitter-feed/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/kebo-twitter-feed/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/kebo-twitter-feed/reviews/)

## Tags

 * [php-error](https://wordpress.org/support/topic-tag/php-error/)

 * 17 replies
 * 2 participants
 * Last reply from: [Peter Booker](https://wordpress.org/support/users/peterbooker/)
 * Last activity: [12 years, 8 months ago](https://wordpress.org/support/topic/error-with-php/page/2/#post-3995537)
 * Status: resolved