Subscribe to How-To Geek Mag-subscribe sa Paano-Upang Geek

Important! This is an automatic machine translated page. If you can read english, you should Click Here to read the original English version of the article.

Printing the contents of a PHP Array Pagpi-print ang mga nilalaman ng isang PHP Array

This is a pretty common task, but it's surprising how many PHP newbies don't know about it yet. Ito ay isang pretty karaniwang gawain, ngunit ito ay kagulat-gulat kung gaano karaming mga PHP Newbies hindi alam tungkol sa mga ito pa. If you want to see the structure of your PHP Array, all you need to do is this: Kung nais mong makita ang istraktura ng iyong mga PHP Array, ang lahat ng kailangan mong gawin ay ito:

print_r($myarray); print_r ($ myarray);

This will give you a listing of all the items in the array, including multi-dimensional arrays. Ito ay magbibigay sa iyo ng isang listahan ng lahat ng mga bagay sa array, kasama ang multi-dimensional arrays. Obviously this should only be used for testing / debugging purposes. Malinaw na ito ay dapat lamang gamitin para sa pagsubok / debugging na layunin.

This article was originally written on 09/26/06 Tagged with: Ang artikulong ito ay orihinal na isinulat sa 09/26/06 Tagged with: PHP PHP , , Programming Programming

Daily Email Updates Araw-araw na Updates Email

You can get our how-to articles in your inbox each day for free. Maaari kang makakuha ng aming kung-paano na mga artikulo sa iyong inbox sa bawat araw para sa libre. Just enter your name and email below: Ilagay lamang ang inyong pangalan at email sa ibaba:


Name: Pangalan:
Email: Email:

Comments (6) Comments (6)

  1. sven sven

    and if you like it human-readable: at kung gusto mo ito ng tao nababasa:
    echo “”; print_r($myarray); echo “”; echo ""; print_r ($ myarray); echo "";

    have fun! magsaya!

  2. Magic.Crazy Magic.Crazy

    this is more human-readable : ito ay mas maraming tao-nababasa:

    echo ”; echo ";
    print_r($array); print_r ($ array);
    echo ”; echo ";

  3. Hmmmm Hmmmm

    You may want to try this: Baka gusto ninyong subukan ito:

    echo “”; echo "";
    print_r($location); print_r ($ lokasyon);
    echo “”; echo "";

  4. Hmmmm Hmmmm

    echo “(html open tag)pre(html close tag)”; echo "(html buksan ang tag) pre (html malapit na tag)";
    print_r($location); print_r ($ lokasyon);
    echo “\”; echo "\";

  5. Hmmmm Hmmmm

    echo “(less than sign)pre(greater than sign)”; echo "(mas mababa kaysa mag-sign) pre (mas malaki kaysa sa mag-sign)";
    print_r($location); print_r ($ lokasyon);
    echo “(less than sign)/pre(greather than sign)”; echo "(mas mababa kaysa mag-sign) / pre (greather kaysa mag-sign)";

  6. Hmmmm Hmmmm

    between the quotes are the html pre tags (open and then close). sa pagitan ng mga quotes ay ang html pre tag (bukas at pagkatapos ay close).


Our Friends Ang aming mga Friends
Getting Started Pagsisimula


About How-To Geek Tungkol sa Paano-Upang Geek
What Is That Process? Ano ba ang Proseso Iyon?
svchost.exe svchost.exe
jusched.exe jusched.exe
dwm.exe dwm.exe
ctfmon.exe ctfmon.exe
wmpnetwk.exe wmpnetwk.exe
wmpnscfg.exe wmpnscfg.exe
rundll32.exe rundll32.exe
wfcrun32.exe wfcrun32.exe
Ipoint.exe Ipoint.exe
Itype.exe Itype.exe
Wfica32.exe Wfica32.exe
Mobsync.exe Mobsync.exe
conhost.exe conhost.exe
Dpupdchk.exe Dpupdchk.exe Adobe_Updater.exe Adobe_Updater.exe

Copyright © 2006-2009 HowToGeek.com. Copyright © 2006-2009 HowToGeek.com. All Rights Reserved. All Rights Reserved.