Here is the solution with the FOR LOOP
public function printFeed($feed)
{
$i = 0;
foreach($feed->entries as $entry)
{
echo "\t" . $i ." ". $entry->title->text . "<br />";
$categories = $entry->category;
$j = 0;
foreach($categories as $labels)
{
echo "Label $j is: ". $categories[$j]->getTerm() . "<br />";
$j++;
}
$i++;
}
}
Thanks,
Lokesh.
On Jul 26, 1:56 am, Jdvno <joaomus...@gmail.com> wrote:
> Hi, I'm new to php programming, claases and objects are concepts that
> I barely grasp if at all, yet I'm crazy enough to dive into the Gdata
> API. I need help, I'm getting the feeling that the Gdata api for
> blogger is very bad, at least for me.
>
> I'm having a major problem with labels, how do I add labels and
> retrieve labels from a post?
>
> function printFeed($feed)
> {
> $i = 0;
> foreach($feed->entries as $entry)
> {
> // echo "\t" . $i ." ". $entry->title->text . "\n";
> echo "". $entry->title->text ."".$entry->getCategory()."<br/>";
> $i++;
> }
> }
>
> The only thing this does, is print the word "Array" next to the blog
> post title, how do I loop torugh this array?
>
> Best Regards
> Jdvno
--
You received this message because you are subscribed to the Google Groups "Blogger Developer Group" group.
To post to this group, send email to bloggerdev@googlegroups.com.
To unsubscribe from this group, send email to bloggerdev+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bloggerdev?hl=en.
No comments:
Post a Comment