Displaying code with <pre> tags.
- by iMaster
Currently I'm using
<pre><code> code here </code><pre>
to display code. I'm pulling this information from a DB for a blog. The problem I'm having is that some of the code isn't showing. For example, in the source code I have this:
<pre><code><br />
echo '<ul class="mylist"><li><ul class="left">';
foreach($nameArray as $name) {
if($countervar == $half) {
echo '</ul></li>';
echo'<li><ul class="right">';
}
echo '<li>$name</li>';
++$i;
}
echo '</ul></li>';
echo '</ul>';
?>
But all that shows up is this:
echo '';
foreach($nameArray as $name) {
if($countervar == $half) {
echo '';
echo'';
}
echo '$name';
++$i;
}
echo '
An there's some really weird formatting/spacing issues as well. Any ideas as to what is causing this? I should also mention that some of the other sets of code show up just fine.