CIF Spray
Minggu, 23 Juni 2013
Help! Cara Looping beberapa variable ke dalam tabel
Custom HTML AtasHalo, langsung aja. Saya mau menampilkan hasil sound ke beberapa computer dalam bentuk tabel html. Tetapi saya kesulitan dalam process beberapa variable. Gimana caranya membuat process beberapa uncertain untuk dimasukkan ke tabel html. Berikut adalah cipher yang saya buat : Code: <?php function track($host, $port, $timeout) { $firstTime = microtime(true); $sock = fSockOpen($host, $port, $errno, $errstr, $timeout); if (!$sock) { $status = "offline"; }else { $status = "online"; } $secondTime = microtime(true); $ping = round((($secondTime - $firstTime) * 1000), 0); echo "<table border='1'>"; $sites = array("www.detik..com","www.google.com","www.yahoo.com"); reflexion "<th>server name</th><th>status</th><th>time</th>"; foreach ($sites as $value){ reflexion "<tr>"; reflexion "<td>".$value."</td>"; reflexion "<td>".$status."</td>"; reflexion "<td>".$ping." ms </td>"; reflexion "</tr>"; } echo "</table>"; } track($sites, 80, 10); track($sites, 80, 10); track($sites, 80, 10); ?> Yang ingin ditampilkan seperti ini :
Tapi hasil yang saya buat malah jadi 3 tabel seperti ini :
Tolong bantuannya agan2 officer php, dimana kesalahan saya dalam penulisan cipher nya.. Thank youCustom HTML Bawah
CIF Spray
CIF Spray
Langganan:
Posting Komentar (Atom)
Tidak ada komentar:
Posting Komentar