mark110384 Posted September 4, 2008 Share Posted September 4, 2008 Hey guys, I have an item slider created using Javascript, at the moment I have had to create individual tables as shown below that contains the item data, does anyone know how, if is at all posible to incorporate a PHP while loop that drops in data brought back from a database, I just don't hava a clue on how to use the 2 langauges together. Any help would be appreciated. sts_ai("i0", [1,"<table border =\"0\" width=\"210\" height=\"150\" cellpadding=\"0\" cellspacing=\"0\" style=\"font-size:11px; font-family:Verdana; margin:5px;\">\r\n <tr>\r\n <td width=\"91\" rowspan=\"12\" class=\"STYLE10\"><img src=\"../images/mk2002_thumbnail.bmp\" alt=\"\" name=\"p\" width=\"81\" height=\"73\" id=\"p\" /></td>\r\n <td width=\"300\" class=\"STYLE10\"> </td>\r\n </tr>\r\n <tr>\r\n <td><a href=\"#\" style=\"color:#000000\"><strong style=\"color:#0000FF\"><u>Item Title </u></strong></a></td>\r\n </tr>\r\n \r\n <tr>\r\n <td>Space</td>\r\n </tr>\r\n <tr>\r\n <td>Content - Expand to fit whole area</td>\r\n </tr>\r\n <tr>\r\n <td>more content info</td>\r\n </tr>\r\n <tr>\r\n <td> </td>\r\n </tr>\r\n \r\n</table>"],[],"i0","i0"); sts_es(); Link to comment https://forums.phpfreaks.com/topic/122707-php-loop-with-javascript/ Share on other sites More sharing options...
BlueSkyIS Posted September 4, 2008 Share Posted September 4, 2008 you can incorporate HTML in your PHP loops, yes? it's the same thing with javascript. just echo out what the javascript should be and test/view it in your browser to make sure it's what you need. Link to comment https://forums.phpfreaks.com/topic/122707-php-loop-with-javascript/#findComment-633705 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.