[PHP-DB] help newbie

2003-12-08 Thread Hadi
Hi , please help this newbie , how to make my database view from

[1]  [2]   [3]  [4]  [5]  [6]  [7]  [8]


to


 1   2   34  


Thanks very much
Hadi



require(cobaconfig.php);

 $numresult = mysql_query(select * from dataiklanbaris order by id desc);
 $jumlah = mysql_num_rows($numresult);
 $limit = 20;


 if (empty($offset)) {
 $offset = 0;
 }
 $query = select * from dataiklanbaris order by id desc limit $offset,
 $limit;
 //pembagian halaman dimulai
 $result = mysql_query($query);

 $halaman = intval($jumlah/$limit);
 if ($jumlah%$limit) {
 $halaman++;
 }
 for ($i = 1; $i=$halaman; $i++) {

 $newoffset=$limit*($i-1);
 if ($offset != $newoffset) {
 echo  [a href=\lihatiklan.php?offset=$newoffset\$i/a];
 } else {
 echo [$i];
 }
 }
 //pembagian halaman selesai

 while ($row = mysql_fetch_array($result)) {
 echo (

 tr
 td width=\330px\font size =\3\$row[isiiklan]br/td
 td width=\50px\p align =\center\font size
 =\2\$row[lt]br/td
 td width=\50px\p align =\center\font size
 =\2\$row[lb]br/td
  td width=\70px\p align =\center\font size
 =\2\$row[harga]br/td
  td width=\100px\p align =\center\font size
 =\2\$row[kecamatan]br/td
td width=\100px\p align =\center\font size
=\2\$row[kota]br/td
td width=\100px\a href=\detail.php?id=$row[id]\
target=\blank\p
align =\center\font size =\2\$row[gambar]br/a/td
/tr
);
  }

  ?

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



Re: [PHP-DB] help newbie

2003-12-08 Thread Tim Nilimaa
Hadi wrote:

Hi , please help this newbie , how to make my database view from

[1]  [2]   [3]  [4]  [5]  [6]  [7]  [8]

to

 1   2   34  

Thanks very much
Hadi


***removed code***
You could convert the array into a string but why would you like to do 
that?
Not a good way but a possible way is
$varString = $array[index] .   . $array[nextindex] ...
ofcouse it would be better with an foreach but still arrays  string imho

--
Tim Nilimaa
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


Re: [PHP-DB] help newbie

2003-12-08 Thread roy.a.jones

Return Receipt
   
Your  Re: [PHP-DB] help newbie 
document   
:  
   
was   Roy A Jones/IT/GSK   
received   
by:
   
at:   12/08/2003 10:45:11 AM   
   

-- 
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php