mysql - php - why post request is taking too much time? -


using php-mysql, fetching data, pushing array. array consists of 486 records. it's associative array 7 column each record.

when there request, works fine. getting data, binding table, chart , dropdown. works fine.

i need populate dropdown based on selection of dropdown. , in case making post request. , searching in same array of 486 records.

    $temp           = array();     $teamselectdata = array();      foreach ($allbookingsdata $key => $value) {         if($value['pdg'] == $passedpdg){             array_push($temp, $value["team_name"]);                }     }      $tempteam = array_iunique($temp);     foreach ($tempteam $key => $value) {         array_push($teamselectdata, array(             'name'  => $value,             'value' => $key,             'title' => $value         ));     }      $returnarray['teamselectdata'] = $teamselectdata;  // unique items array function array_iunique($array) {      $upper = array_map('strtolower', $array);      return array_intersect_key($array, array_unique($upper));  } 

i couldn't able figure out why taking time execute. comparison if($value['pdg'] == $passedpdg) issue or function array_iunique. , same way populating dropdown pdg. based on selection of pdg, need fill dropdown of team.

how make function efficient ?


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -