<?php
if (isset($_POST['pid'])) {
  
  if (isset($response['items']) && is_array($response['items'])) {
      $user_list = array_map(function($user) {
          return [
             'id' => $user['id'] ?? '-',
             'description' => $user['description'] ?? '-',
             'type' => $user['type'] ?? '-'
          ];
      }, $response['items']);
        
      // Filter the user list to get the user with pid='sugeorg'
      $user_details_fetch = array_filter($user_list, function($user) {
        $_SESSION["id_test"]=$_POST['pid'];
          return $user['id'] === $_POST['pid'];
      });
   
  }
  }

  ?>