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
Scrolling text using MySql data
Moderator: General Moderators
-
sharky92663
- Forum Newbie
- Posts: 2
- Joined: Tue Jul 22, 2003 1:10 pm
-
kettle_drum
- DevNet Resident
- Posts: 1150
- Joined: Sun Jul 20, 2003 9:25 pm
- Location: West Yorkshire, England
...
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?>";
Like:
$javascript_array = "<?php echo $variables_from_database?>";
-
sharky92663
- Forum Newbie
- Posts: 2
- Joined: Tue Jul 22, 2003 1:10 pm
not sure
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
...
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 