title: php notice array to string conversion
body: <p>I have an error with my function.</p>
  
  <p>Notice: Array to string conversion in....</p>
  
  <p>Just I wanna check array availability &amp; return if have. I have searched but, I can't do.</p>
  
  <p>Here is my function:</p>
  
  <pre><code>function if_array_exists($array,$value) {
      if(isset($array[$value]) || array_key_exists($value,$array)) {
          $result=array();
          $result[0]=$value;
          return $result;
      } else {
          return '&lt;!--- no array named as '.$value.' value in ---!&gt;';
      }
  }
  </code></pre>