i need to print a table where there should be 5 rows
this has to done by loops…
can any one help me???
i need to print a table where there should be 5 rows
this has to done by loops…
can any one help me???
What do you have so far, and where do you get stuck?
Where does the script/output go wrong, or is it doing something that it’s not supposed to?
[code]<?php
mysql_select_db($database_conmyprice, $conmyprice);
$sql_qry=mysql_query(“SELECT * FROM items WHERE itemID=‘1000141’”);
$sql_arr=mysql_fetch_assoc($sql_qry) or die(mysql_error());
$get_IDs=explode(",",$sql_arr[‘txt_crosell’]);
$ii=sizeof($get_IDs);
$xx=0;
echo “
$get_ID | ”;$get_ID | ”;
Here size of the array is 6, now i want get printed first 3 elements of the array to first row with 3 columns and next 3 elements of the array to next row and so on…[/code]
something like in http://www.techstore.co.uk
Here’s some pseudo-code on what you want to do:
<table>
- loop through items
-- if first column in row, <tr>
- print item
-- if last/third column in row, </tr>
- end loop
</table>
Thanks for the reply…
i had done it myself…
anyway thanks again