I have the following scripto:
<script type="text/javascript">
//Secify scroller contents
var line=new Array()
<?
// db connection bit not included on forum post
$sql = "SELECT * FROM ccl_news ORDER BY id LIMIT 5";
$res = mysql_query($sql);
while ($row = mysql_fetch_array($res)) {
echo 'line[($i)]="' $row[1] . '"';
}
?>
</script>
Basically, in the perfect world, I would load the page and it would echo out:
<script>
//Secify scroller contents
var line=new Array()
line[1]="This is an awesome script"
line[2]="It brings up the text you want..."
line[3]="One letter at a time"
line[4]="You can add and subtract lines as you like."
line[5]="It\'s very cool and easy to use"
</script>
I've tried my code but keep getting parse errors galore.
If anyone can shed some light on this, I would be forever in their debt.
Thankyou for your time and help!