Scrolling text using MySql data

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
sharky92663
Forum Newbie
Posts: 2
Joined: Tue Jul 22, 2003 1:10 pm

Scrolling text using MySql data

Post by sharky92663 »

Hello,

I'm trying to implement a scrolling text area that pulls the text from a MySql database. There are plenty of javascript modules that performs the function with a pre-defined array; however, I need the text to be dynamic. If anyone has such a script or could provide some insight, I'd love to hear from you. Thanks.

Jim
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

...

Post by kettle_drum »

Just use a javascript one that you can find and then set the javascript array of text using php.

Like:

$javascript_array = "<?php echo $variables_from_database?>";
sharky92663
Forum Newbie
Posts: 2
Joined: Tue Jul 22, 2003 1:10 pm

not sure

Post by sharky92663 »

Thanks for your reply. I've tried something like this and the php code embedded within the <script> tags don't seem to work. I also need to implement a loop so that all the records from a table are written to the array.
kettle_drum
DevNet Resident
Posts: 1150
Joined: Sun Jul 20, 2003 9:25 pm
Location: West Yorkshire, England

...

Post by kettle_drum »

Well the php code will be parsed server side and the javascripts runs client side, so by the time the code reaches the user the php code in the javascript should have been parsed to leave the text you want to show :)
Post Reply