Hey im stuck on an issue with displaying text from an sql table into a syntax highlighter, the issue i have is that the line is breaking and not using the full width. It does use the width if i use normal characters, but with code it keep line breaking inplaces it shouldnt be. Im wondering if perhaps i need to change something on how the text is echo’d from the sql.
you can see with normal text the width is fine: http://www.hushmag.co.uk/code/a_Snip.php?snipid=17
but with some source it displays like this: (line breaking at the wrong point on each line) http://www.hushmag.co.uk/code/a_Snip.php?snipid=19
On the inputting form to the db i use addslashes to allow the addition chars [php]$snipcontent = addslashes($_POST[‘snipcontent’]);[/php]
i wonder if i am supposed to use something else for now displaying from the sql??
The syntax highlighter here is denoted within the
.body1 {
height: auto;
width: 1000px;
margin-left: auto;
margin-right: auto;
}
<? echo $sniptitle ?>
Posted by <? echo $postedby ?>
Posted: <? echo $datetime ?>
[/php]Any help much appreciated
thanks
Stu