Please help!!
Posted: Mon Mar 30, 2009 5:26 am
I have this code in a template that I am customising
As it is, it outputs right across the page. What I really want is to separate the letters on different lines like this:
ABCDE on line 1
FGHIJ on line 2
KLMNO on line 3
PQRSTU on line 4
VWXYZ on line 5
How do I do this
Many Thanks
Eddie
Code: Select all
<?php
$lstr = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
for( $i = 0; $i < strlen($lstr); $i++ ) {
$l = substr( $lstr, $i, 1);
echo '<a href="' . tep_href_link(FILENAME_DEFAULT, 'alpha=' . $l ) . '"><u>' . $l . '</u></a> ';
}
?>ABCDE on line 1
FGHIJ on line 2
KLMNO on line 3
PQRSTU on line 4
VWXYZ on line 5
How do I do this
Many Thanks
Eddie