title: check an array value whether its exists or not in php
body: <p>I have a php code like this.</p>
  
  <pre><code>&lt;?php 
        $books = get_group('books');
        if($books){
        $booksfilter = "";
        foreach($books as $book){
          $booksfilter .= "&lt;ul class=\"books\"&gt;";
          $booksfilter .= "&lt;li&gt;&lt;a href='".$book['books_image'][1]."' &gt;image&lt;/a&gt;&lt;/li&gt;";
          $booksfilter .= "&lt;li&gt;".$book['books_image_title'][1]."&lt;/li&gt;";
          $booksfilter .= "&lt;li&gt;".$book['books_image_description'][1]."&lt;/li&gt;";
          $booksfilter .= "&lt;/ul&gt;";
           }
          echo $booksfilter; 
         } ?&gt;
  </code></pre>
  
  <p>The code working fine. My problem is I have some problem while giveing css padding for li elements. It creates empty space when thearray has no value.  So can anyone tell me how to check whether the value exists or not.</p>
  
  <p>I mean i want something like this</p>
  
  <pre><code>if value exists ($book['books_image_description'][1])
  {
      $booksfilter .= "&lt;li&gt;".$book['books_image_description'][1]."&lt;/li&gt;";
  }
  </code></pre>
  
  <p>Can anyone help me? Thanks</p>