Avalanche Posted July 11, 2003 Share Posted July 11, 2003 [php:1:3d07c06ba5]<?php $query_events = mysql_query(\"SELECT * FROM bob_events ORDER BY ID DESC\"); ?>[/php:1:3d07c06ba5] [php:1:3d07c06ba5]<?php while($r=mysql_fetch_array($query_events)) { // cycle through events $event=$r[\"event\"]; // turn row variable to regular variable $event = addslashes($event); echo \"scrollercontent[0]=\'<b>-</b> $event\'n\"; // add on to scrollies } ?>[/php:1:3d07c06ba5] I have two events in the table, but it will only echo the last one. The two ones are: \"Cool Website Scripts\" and \"New addition to the Wile\'s family.\" Any idea why this is not working? Thanks. Quote Link to comment Share on other sites More sharing options...
dammitjanet Posted July 11, 2003 Share Posted July 11, 2003 echo "scrollercontent[0]=\'<b>-</b> $event\'n"; // add on to scrollies thats your probelm - you are replacing the content - not adding to it.. Quote Link to comment Share on other sites More sharing options...
Avalanche Posted July 11, 2003 Author Share Posted July 11, 2003 I know, I was going to fix that later... anyway, I just figured out what it was. I had it start echoing it on one of the JavaScript\'s comment lines instead of a command line... I just had to add a n to the echo above it and it all worked out. Whoops. :roll: Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.