The echo in the last line seems to be causing problems. However I can’t take it out or it’ll just print the line directly. How can I rewrite that part? Also, is there anything else wrong with the way the other php functions are written?
$output .= "
<script src='http://platform.twitter.com/widgets.js'></script>
<a href='http://twitter.com/share' class='twitter-share-button'
data-url='". the_permalink() ."'
data-via='username'
data-text='". the_title() ."'
data-count='horizontal'>Tweet
</a>
<iframe src='http://www.facebook.com/plugins/like.php?href=". echo urlencode(get_permalink($post->ID)) ."&layout=button_count&show_faces=false&width=90&action=like&colorscheme=light' scrolling='no' frameborder='0' allowTransparency='true' style='border:none; overflow:hidden; width:90px; height:20px;'></iframe>'";
You should remove the “echo”, you don’t need it in a string concatenation: