Access podio return value

Comments

4 comments

  • Brian Stengaard

    Hi Indika,

    You can check out the docs for the Podio PHP library - specifically the bit about working with item fields at: http://podio.github.io/podio-php/items/

    Cheers,

    Brian

    0
    Comment actions Permalink
  • Indika Ratnayake

    Thanks for the reply Brian. I tried that but it didn't display anything. I know the data is there because when I try var_dump($items); it displays everything. I am having trouble extracting individual elements. 

    0
    Comment actions Permalink
  • Brian Stengaard

    Hi Indika,

    Depending on the field type you have to access the content slightly differently (see http://podio.github.io/podio-php/fields/ for examples). But this should be enough to get you started

    $items = PodioItem::filter($app_id);
    $item = $items[0];
    foreach ($item->fields as $i => $value) {
    print $value->field_id . " (" . $value->type . "): " . $value->values . "\n";
    }

    Cheers,

    Brian

    0
    Comment actions Permalink
  • Indika Ratnayake

    Thanks a lot Brian,

    It worked.

    Cheers

    0
    Comment actions Permalink

Please sign in to leave a comment.

Powered by Zendesk