This code loop returns any number of image links. The variable `$picture->description`returns a string of text with underscores that need to be removed.

```
bluebell_glitter_print_one_piece_with_bubble_skirt_LGG5659WT14_china

```

All coding variations that I have tried either end in a single correct image link or a white screen. 

How can I edit this loop so that the `data-caption-desc` has no underscores?

```
if(count($pictures)){               
    foreach($pictures as $picture){
        $output .= '<a href="'.get_option('siteurl').$picture->path.'/'.$picture->filename.'" title="'.$picture->alttext.'" data-caption-title="'.$picture->alttext.'" data-caption-desc="'.$picture->description.'">
                        <img class="wpnggimgcls" src="'.get_option('siteurl').$picture->path.'/thumbs/thumbs_'.$picture->filename.'" style="" />
                    </a>';
    }
}

```