title: Warning: in_array() expects parameter 2 to be array
body: <p>I read the php <a href="http://php.net/manual/en/function.in-array.php" rel="nofollow">in_array</a> manual and create some code lines.</p>
  
  <pre><code>    $handle = fopen("/path/to/file", "a")  or die('Cannot open file:');
  
      $y= $command_name1.$steps1;
      $x=trim(shell_exec("grep -ri -o '$y' /path/to/file "));
      $Z=array($x);
      if (in_array($y,$z,false))
      {
              echo "thise 2 variables are already in this file";
              fclose($handle);
      }
  
      else {
      //write some thing on  that file
      }
  </code></pre>
  
  <p>But this gives above error. And I want to know is, can 2 variables(<code>$command_name1</code> and <code>$steps1</code>)adds together and search it through <code>in_array</code> ?.</p>