Hi all. I want to echo the following code:
After :HTML Code:<td> <a href="#" onclick="player=play.open('divbox', 'div', 'videoId', ' Window Title', 'width=450px,height=400px,left=200px,top=150px,resize=1,scrolling=1'); return false;" title="Play This Video"><img src='http://www.somsite.com/default.jpg' /></a> <h4>Video title</h4> <div id="videoId" style="display: none;"> <h2>Video title</h2> <object width="400" height="300"> <param name="movie" value="http://www.youtube.com/v/X86S5oZzzh4&autoplay=1"></param> <param name="wmode" value="transparent"></param> <embed src="http://www.youtube.com/v/X86S5oZzzh4&autoplay=1" type="application/x-shockwave-flash" wmode="transparent" width="400" height="300" autostart="true"></embed> </object> </div> </td>
But i don't know how use $row['idyoutube'] and $row['thumbnail_url'] inside that block of html.echo '<td width="' . $colWidth . '%">' .
I want to replace the followings:
1)I want to replace videoId with value of $row['idyoutube']
2)replace video title with $row['title']
3)replace Window Title with $row['title'] ,
4) replace end value of http://www.youtube.com/v/ with $row['idyoutube']
5)replace image source http://www.somsite.com/default.jpg with value of . $row['thumbnail_url'] .
I be happy if some one show me how i can achive this.Thanks
php code:
PHP Code:while ($row = mysql_fetch_assoc($result)) {
if ($i % $colsPerRow == 0) {
// start a new row
echo '<tr>';
}
echo '<td width="' . $colWidth . '%">' .
//here i want to output the html block of code
'<br>' . $row['title'] . '</a><br />' . $row['view_count'] . '|' . $row['comment_count'] . '=>Status:' . $row['embed_status'] . '</td>';
if ($i % $colsPerRow == $colsPerRow - 1) {
// end this row
echo '</tr>';
}
$i += 1;
}




Reply With Quote