Senin, 07 Oktober 2013

PHP Indonesia - Facebook: [ASK] Bagaimana cara menampilkan data array sspert...

PHP Indonesia - Facebook
PHP Indonesia is a community for everyone that loves PHP. Our focus is in the PHP world but our topics encompass the entire LAMP stack. Topics include PHP coding, to memcached handling, db optimizations, server stack, web server tuning, code deploying, hosting options and much much more. Youtube Channel : http://www.youtube.com/user/OurPHPIndonesia Twitter : @php_indonesia NOTE: Rules for Wall posting: https://www.facebook.com/groups/35688476100/doc/10151597056316101/ Daftar Keanggotaan : http://www.facebook.com/groups/35688476100/doc/10150671770741101/ 
[ASK] Bagaimana cara menampilkan data array sspert...
Oct 8th 2013, 04:11, by Ary De Oblo

Ary De Oblo 4:11am Oct 8
[ASK] Bagaimana cara menampilkan data array ssperti ini ya ?

Array
(
[0] => Array
(
[.id] => *6197
[time] => 11:46:37
[topics] => wireless,info
[message] => 74:E5:43:8F:AB:91@wlan1: disconnected, ok
)

[1] => Array
(
[.id] => *6198
[time] => 11:46:37
[topics] => wireless,info
[message] => 74:E5:43:8F:AB:91@wlan1: connected
)

[2] => Array
(
[.id] => *6199
[time] => 11:46:41
[topics] => wireless,info
[message] => 74:E5:43:8F:AB:91@wlan1: reassociating
)
)

Saya mencoba menampilkan menggunakan echo seperti ini :

$time = $ARRAY[34]['time'];
$topics = $ARRAY[34]['topics'];
$message = $ARRAY[34]['message'];
echo "$time $topics $message";

Kalo seperti itu yang tampil hanya Key 34 saja, lalu bagaimana cara menampilkan semuanya ?
Maaf ya newbie soalnya om .. hehehe

Andi Malik Rizki Maula 4:11am Oct 8
print_r()

Ary De Oblo 4:12am Oct 8
tampilannya berantakkan om ... kalo print_r

Andi Malik Rizki Maula 4:13am Oct 8
echo '<pre>', print_r($ARRAY, TRUE), '</pre>';

Ary De Oblo 4:16am Oct 8
maaf om bukan begitu maksud saya ...
nanti yang tampil biar begini
1. 11:46:37 wireless,info 74:E5:43:8F:AB:91@wlan1: disconnected, ok
2. 11:46:37 wireless,info 74:E5:43:8F:AB:91@wlan1: connected

dan seterusnya gitu om ...

Andi Malik Rizki Maula 4:17am Oct 8
pke foreach() om

Jefry Da Gucci 4:17am Oct 8
pake looping

Ary De Oblo 4:18am Oct 8
Iya bagaimanakah caranya om dg yg saya maksud diatas ? coba om .. ane sudah muter-muter tp gak bisa ... bisa ditulisin contohnya om ?

Andi Malik Rizki Maula 4:20am Oct 8
http://paste.laravel.com/Xe5

You are receiving this email because you subscribed to this feed at blogtrottr.com.

If you no longer wish to receive these emails, you can unsubscribe from this feed, or manage all your subscriptions

Tidak ada komentar:

Posting Komentar