While loop add class to first result
<p>I have the following </p>

<pre><code>while ( $query-&gt;have_posts() )
{
$query-&gt;the_post();
if ( $keys = get_post_custom_keys() )
{
    echo "&lt;div class='clearfix card-prod ".($i==0?'first':'')."'&gt;&lt;div class='top-dets'&gt;&lt;span class='card-title'&gt;";
    echo the_title();
    echo "&lt;/span&gt;";


// Network query 
    $network_value = get_post_custom_values('srchnetwork');
    foreach ( $network_value as $key =&gt; $value ) {
    echo '&lt;span class="srch-val-"&gt;'. $value . '&lt;/span&gt;'; }

// Pricing Query
    $pricing_value = get_post_custom_values('srchpricing');
    foreach ( $pricing_value as $key =&gt; $value ) {
    echo '&lt;span class="srch-val-1"&gt;'. $value . '&lt;/span&gt;'; }

// Setup Query
    $setup_value = get_post_custom_values('srchsetupfee');
    foreach ( $setup_value as $key =&gt; $value ) {
    echo '&lt;span class="srch-val-2"&gt;'. $value . '&lt;/span&gt;'; }

// Services Query
    $services_value = get_post_custom_values('srchservices');
    foreach ( $services_value as $key =&gt; $value ) {
    echo '&lt;span class="srch-val-3"&gt;'. $value . '&lt;/span&gt;&lt;/div&gt;'; }

// Big Card Query
    $bigcard_value = get_post_custom_values('bigcard');
    foreach ( $bigcard_value as $key =&gt; $value ) {
    echo '&lt;img src="wp-content/themes/cafc/images/cards/'. $value . '" /&gt;'; }


//      echo '&lt;img src="wp-content/themes/cafc/images/top-choice.jpg" alt="Top Choice" class="topchoice"&gt;';

    echo the_excerpt()."&lt;/div&gt;";   }};
} 
</code></pre>

<p>Im wondering if its possible that I can wrap the first returned result within a span tag? if so how would I go about doing this? thanks </p>
