Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $num_tweets = 10;
- foreach ($posts as $post) {
- if($num_tweets-- == 0) break;
- $my_posts[] = $post->title;
- }
- // 10 times loop will run
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement