Hi I have data which I'm exporting to excel using PHP & header("Content-Type: application/vnd.ms-excel") etc.....

Here is what I want to do...

I'm looping through the recordset and when there is a duplicate environment name and version name I want to only print the detail information and not the environment name and version again... So it would look something like this...

Environment 1 Details1
-----------------Details2
-----------------Details3 etc...

rather than...

Environment 1 Details1
Environment 1 Details2 etc...

Here is my logic and for some reason it is not working...
There is more code above which gets the next environment and version name, I just figured I didn't need to include that....

PHP Code:
<?php if ($strEnv === $lastStrEnv && $strVer === $lastStrVersion) {?>
               //Details only since its same env
    <?php }
                 else {
?>
           //Write new env name version and details...
            <?php 
            
                                
//Place values into var holder..
                
$lastStrVersion $strVer;
                
$lastStrEnv $strEnv;
            
?>
            
            <?php $rs->MoveNext(); 
            } 
?>
Any help would be appreciated
Thanks,