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 Tlač obsahu PHP Array

This is a pretty common task, but it's surprising how many PHP newbies don't know about it yet. To je do istej miery spoločnú úlohu, ale je to prekvapujúce, koľko PHP nováčikov Neviem o tom ešte. If you want to see the structure of your PHP Array, all you need to do is this: Ak chcete vidieť štruktúru vášho PHP Array, všetko, čo potrebujete urobiť, je toto:

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

This will give you a listing of all the items in the array, including multi-dimensional arrays. Tým sa vám zoznam všetkých položiek v poli, vrátane multi-rozmerné pole. Obviously this should only be used for testing / debugging purposes. Zrejme by to malo byť použité len na testovanie / ladenie účely.

This article was originally written on 09/26/06 Tagged with: Tento článok bol pôvodne napísaný na 09/26/06 Tagged s: PHP PHP , , Programming Programovanie

Daily Email Updates Denný Svářeč

You can get our how-to articles in your inbox each day for free. Môžete si naše jak-na články vo vašej schránky každý deň zadarmo. Just enter your name and email below: Stačí zadať svoje meno a e-mail nižšie:


Name: Meno:
Email: E-mail:

Comments (8) Komentáre (8)

  1. sven sven

    and if you like it human-readable: a ak vám to páči, človek-čitateľný:
    echo “”; print_r($myarray); echo “”; echo ""; print_r ($ myarray) echo "";

    have fun! have fun!

  2. Magic.Crazy Magic.Crazy

    this is more human-readable : je to viac človeka-čitateľný:

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

  3. Hmmmm Hmmmm

    You may want to try this: Môžete skúsiť nasledujúce:

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

  4. Hmmmm Hmmmm

    echo “(html open tag)pre(html close tag)”; echo "(otvorené html tagu) pre (html zavrieť tag)";
    print_r($location); print_r ($ location);
    echo “\”; echo "\";

  5. Hmmmm Hmmmm

    echo “(less than sign)pre(greater than sign)”; echo "(menej ako znak) pre (väčšia ako značka)";
    print_r($location); print_r ($ location);
    echo “(less than sign)/pre(greather than sign)”; echo "(menej ako značka) / pre (greather ako značka)";

  6. Hmmmm Hmmmm

    between the quotes are the html pre tags (open and then close). medzi úvodzovky sú vopred html tagy (otvorenie a zatvorenie).

  7. jeroen jeroen

    surprising how very helpful this post is for php newbies like me s počudovaním, ako veľmi užitočné tento post je pre php nováčikov, ako som ja :)
    thx alot! thx a lot!

  8. Jhm718 Jhm718

    This /is/ super helpful for PHP newbies like me. Táto / je / veľmi užitočná pre nováčikov, PHP, ako som ja.

    Thanks! Vďaka!


Our Friends Naši priatelia
Getting Started Začíname


About How-To Geek O tom, ako-To Geek
What Is That Process? Čo je to za proces?
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.