Hi,
I am stepping though a table and want to display the output after
the stepping through has finished and I have calculated the pagination.
So I think that I need to put the results into and array and then
print out the array a bit later on.
I am a bit rusty on creating arrays
This is my php:
I realise that the data in inside an array called $row, but that is going to be replaced at the next loop of the while. Also the $link1 & 2 will change with each loop.
Its going to loop 20 times and then after its finished, I will calculate some
stuff and display the results of that stuff, and then I want to display the
results from those twenty loops.
So thats what I need the extra array for.
Can anyone help me out with this one ?
I am stepping though a table and want to display the output after
the stepping through has finished and I have calculated the pagination.
So I think that I need to put the results into and array and then
print out the array a bit later on.
I am a bit rusty on creating arrays
This is my php:
Code:
while($row = mysql_fetch_assoc($result)){
extract($row);
$Rctr =$row_ctr+1;
$scn = strtolower(trim($sc_name));
$link1 = "/internet_marketing/online_tuition/".$SEOcat."/".$tute_id.".html";
$link2 = "/internet_guru/$scn/".$user_id.".html";
echo "<div class=\"listerdiv\">
<h2>$Rctr) <a href=\"$link1\">$tute_head</a></h2>
<h3>By <a href='$link2'>$sc_name</a></h3>
</div>";
$row_ctr = $row_ctr + 1;
$ad_ctr = $ad_ctr + 1;
} // end while
Its going to loop 20 times and then after its finished, I will calculate some
stuff and display the results of that stuff, and then I want to display the
results from those twenty loops.
So thats what I need the extra array for.
Can anyone help me out with this one ?
Comment