Extra space

The code outputs $post_title , but for some reason it outputs with an extra space at the end, is there a way to get rid of the space?

else  {
 echo'<h1 class="art-postheader">';
 echo $post_title;
 echo'</h1>';
}

Answer 1, authority 100%

🙂

echo '<h1 class="art-postheader">', trim($post_title), '</h1>';

Answer 2

else echo'<h1 class="art-postheader">'.$post_title.'</h1>';

so write it down 🙂