Forum Moderators: coopster

Message Too Old, No Replies

need help with array

         

WiseOne

6:13 am on Oct 11, 2004 (gmt 0)

10+ Year Member



Hi, i got all the records in an array

while($row=mysql_fetch_array($sql_result)){
$slno[] = $row["SlNo"];
$image_no[] = $row["Image No"];
$title[] = $row["Title"];
$category[] = $row["Category"];
$sub_category[] = $row["Sub-Category"];
$description[] = $row["Description"];
$size[] = $row["Size"];
}

wat i wanna do is generate a html table with 2 columns and xx amount of rows (horizontaly like image gallery) and that entire html tags will be again stored in an array.

for eg.
<table>
<tr>
<td>SL No 1</td>
<td>SL No 2</td>
</tr>
<tr>
<td>Image No 1</td>
<td>Image No 2</td>
</tr>
</table> etc... till == x

and these entire html tags will be again store in an array...
Value of xx number of rows will be passed via form.

hope u guys understood.

thnx

mincklerstraat

7:40 am on Oct 11, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You'll want to look into control structures (I'd use foreach here), arrays (obviously). For the form, you can use the HTML <input type="hidden"> for the number x. Look into the 'concatenator' ('.') for sticking more strings onto the end of strings.