Separating text onto different lines

Hi all,

I’m just starting to learn PHP with previous knowledge of HTML and CSS.

The problem I’m having is separating text onto the next line.

This is how I’ve done it, but is there a simple way instead of splitting the different text onto it’s own line?
Where you can see I have 2 PHP lines, is there no way I can carry on under 1 <?php ?> and force text onto a new line? Or is this actually the way to do it?

[php]

<?php $test[0]="Blue"; $test[1]="Green"; $test[2]="Orange"; $test[3]="White"; $test[4]="Black"; $test[5]="Yellow"; $test[6]="Silver"; $test[7]="Purple"; $test[8]="Red"; ?>

Header 1

<?php echo "$test[1], $test[8] & $test[6]"; ?>
<?php echo "$test[2], $test[3], $test[4], $test[5], $test[1], $test[6], $test[7] and $test[8]"; ?>
[/php]

Sorry,

After spending a few hours looking for an answer, I’ve managed to figure it out by putting in a
in the middle of the code.

[php]

<?php echo "$test[2], $test[3], [b]
[/b]$test[4], $test[5], $test[1], [b]
[/b]$test[6], $test[7] and $test[8]"; ?>[/php]
Sponsor our Newsletter | Privacy Policy | Terms of Service