[RESOLVED] Help using mysql_fetch_assoc values inside echo
Hi all. I want to echo the following code:
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>
After :
Quote:
echo '<td width="' . $colWidth . '%">' .
But i don't know how use $row['idyoutube'] and $row['thumbnail_url'] inside that block of html.
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;
}
Re: Help using mysql_fetch_assoc values inside echo
I guess this is solved from your other post...??
If not I don't quite see what you're asking.
Re: Help using mysql_fetch_assoc values inside echo
Rudvisser yes i figured it out :-). i will mark it az resolved :-)