I made a search box, and i want to search inside JSON data which i take it from this url: <https://jsonplaceholder.typicode.com/todos/>

This is the code how i recive tha data :

```
<?php

  $url = 'https://jsonplaceholder.typicode.com/todos/';

  $cURL = curl_init();

  curl_setopt($cURL, CURLOPT_URL, $url);
  curl_setopt($cURL, CURLOPT_HTTPGET, true);
  curl_setopt($cURL, CURLOPT_RETURNTRANSFER, true);

  curl_setopt($cURL, CURLOPT_HTTPHEADER, array(
      'Content-Type: application/json',
      'Accept: application/json'
  ));

  $result = curl_exec($cURL);

  curl_close($cURL);

  $arrays =  json_decode($result);

 ?>

```

And this is the HTML code for search box and button:

```
<form action="search.php" method="POST" style="search-style";>
      <input type="text" name="search" placeholder="Search" >
      <button type="submit" name="submit-search">Search</button>
</form>

```

And this is the PHP code for SEARCH but i dont know how to finis it :

```
<div>
  <?php
    if (isset($_POST['submit-search'])) {
      $search = $????? ($_POST['search']);  // i dont know how it works, i need a variable 

      foreach ($arrays as $key => $value) {
        echo $value -> $search ;
      }
    }
       ?>
</div>

```

At the end i need to show the result in table or something like that. But i can't get the result..
Any suggestion? Thanks in advance!