hi frnds..

i am using while loop for getting more records..in this having div..i need to change div name dynamically...but right now i cant do that code...plz change the below code.....

<DIV id="div_MoviePicRate" name="div_MoviePicRate" class="text2_grey" align="left">&nbsp;
<IMG alt="I Agree, Your life Sucks" src="images/up.png"  style="cursor:pointer" border="0" onclick="javascript:TF_RateThumb(<?php echo $p_id; ?>,<?php echo $f_id; ?>,1,&#39;[B]div_MoviePicRate&#39[/B];);">

here main problem is , my having having more number of records on same div name....how can i create dynamic div with different names....

javascript code..

function TF_RateThumb(MasterPicID,PicID,RateVal,divObj)

You could add an incremental variable to the code, such as this one :

$i = 1;
foreach($d_array as $da) {
   echo '<div id="name_of_'.$i.'">Content at '.$i.'</div>';

hope you know what i mean.