Basic PHP, I'm not sure how to do this...

I'm trying to float the code snippet below in this //Print Excerpt below. I'm not a coder, just a designer hacking around but I'm not familiar with how I should change the markup to fix within the string.
note: "fr" is a class i created (float right)

<!-- take the code below to fit into the "print excerpt" string below this -->
<div class="fr" style="margin-left:10px;">
<span style="margin-right:5px;"> <?php dd_twitter_generate('Normal','3piggz') ?> </span>
<span style="margin-right:5px;"> <?php dd_google1_generate('Normal') ?> </span>
<span style="margin-right:5px;"><?php dd_fblike_generate('Like Box Count') ?> </span>
</div>

// Print Excerpt.
$srp_content .= "<p class=\"srp-widget-excerpt\">" . $this->extractExcerpt($post);

Thanks