---
title: Receiving multi-value attributes
description: The Agent Toolkit for PHP receives multi-value attributes passed in the SAML assertion from PingFederate using the MultiStringArray PHP class distributed with the Agent Toolkit for PHP.
component: php
page_id: php:setup:pf_php_ik_receiving_multi_value_attributes
canonical_url: https://docs.pingidentity.com/integrations/php/setup/pf_php_ik_receiving_multi_value_attributes.html
revdate: July 5, 2024
---

# Receiving multi-value attributes

The Agent Toolkit for PHP receives multi-value attributes passed in the SAML assertion from PingFederate using the MultiStringArray PHP class distributed with the Agent Toolkit for PHP.

The following code snippet demonstrates how to get the multi-value attributes using the Agent Toolkit for PHP:

```
 <?php
    # Use and instantiate an agent
    use pingidentity\opentoken\agent;
  use pingidentity\opentoken\helpers\multistringarray;

      $myagent = new Agent();

      # read OpenToken into a MultiStringArray ($userInfo)
      $userInfo = $myagent->readTokenFromHttpRequestToMultiStringArray();

      # retrieve single value attribute
      $username = $userinfo->get(TOKEN_SUBJECT, 0);

      # retrieve multiple value attribute. Returns an array of values.
      $multiValues = $userinfo->get("MultiValueAttr");

 ?>
```
