title: Add class to first row PHP
body: <p>I have a loop pulling information from my database. How can I add a class to my first row without using jQuery? </p>
  
  <pre><code>while ( $query-&gt;have_posts() ) : $query-&gt;the_post();
                      if ( $keys = get_post_custom_keys() ) {
                        echo "&lt;div class='card-prod'&gt;&lt;span class='card-title'&gt;";
                        echo the_title();
                        echo "&lt;/span&gt;";
  
                        foreach ( (array) $keys as $key ) {
                          $keyt = trim($key);
                          if ( '_' == $keyt{0} || 'pricing' == $keyt || 'vehicleType' == $keyt || 'coverageRegion' == $keyt || 'locationType' == $keyt )
                            continue;
                          $values = array_map('trim', get_post_custom_values($key));
                          $value = implode($values,', ');
                          echo "&lt;span class='srch-val'&gt;".apply_filters(" $value\n", $value)."&lt;/span&gt;";
                        }
                        echo "\n";
                        echo '&lt;img src="wp-content/themes/cafc/images/cards/dummy.png" /&gt;';
                        echo the_excerpt()."&lt;/div&gt;";}
                  endwhile;
  </code></pre>