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 Spausdinimo į PHP turinys

This is a pretty common task, but it's surprising how many PHP newbies don't know about it yet. Tai gana bendra užduotis, tačiau tai nestebina, kiek PHP naujokai nežino apie tai dar. If you want to see the structure of your PHP Array, all you need to do is this: Jei norite pamatyti savo PHP struktūrą, viską, ką reikia padaryti tai:

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

This will give you a listing of all the items in the array, including multi-dimensional arrays. Tai duos jums į visus masyvo elementus, įskaitant įvairius aspektus matricos sąrašas. Obviously this should only be used for testing / debugging purposes. Akivaizdu, kad tai turėtų būti naudojamos tik bandymams / Derinimo tikslais.

This article was originally written on 09/26/06 Tagged with: Šis straipsnis buvo parašytas ant 09/26/06 Tagged with: PHP PHP , , Programming Programavimas

Daily Email Updates Dienos paštas Atnaujinimai

You can get our how-to articles in your inbox each day for free. Galite gauti mūsų kaip prie straipsnių į Jūsų pašto dėžutę kasdien nemokamai. Just enter your name and email below: Tiesiog įveskite vardą ir elektroninio pašto adresą žemiau:


Name: Vardas:
Email: Paštas:

Comments (8) Komentarai (8)

  1. sven Sven

    and if you like it human-readable: ir jei jums patinka žmonių skaitymo:
    echo “”; print_r($myarray); echo “”; echo ""; print_r ($ myarray); echo "";

    have fun! Have fun!

  2. Magic.Crazy Magic.Crazy

    this is more human-readable : tai daugiau žmonių skaitymo:

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

  3. Hmmmm Hmmmm

    You may want to try this: Jei norite, galite išbandyti šį:

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

  4. Hmmmm Hmmmm

    echo “(html open tag)pre(html close tag)”; echo "(HTML tegus atviras) iš anksto (HTML tegus uždaryti)";
    print_r($location); print_r ($ location);
    echo “\”; echo "\";

  5. Hmmmm Hmmmm

    echo “(less than sign)pre(greater than sign)”; echo "(mažiau nei ženklas) iki (daugiau nei Registruotis)";
    print_r($location); print_r ($ location);
    echo “(less than sign)/pre(greather than sign)”; echo "(mažiau nei Registruotis) / pre (greather nei Registruotis)";

  6. Hmmmm Hmmmm

    between the quotes are the html pre tags (open and then close). tarp kabučių yra html anksto žodžius (atviras ir uždarykite).

  7. jeroen Jeroen

    surprising how very helpful this post is for php newbies like me stebina, kaip labai naudingas šis pranešimas yra PHP newbies like me :)
    thx alot! Thanks a lot!

  8. Jhm718 Jhm718

    This /is/ super helpful for PHP newbies like me. Tai / yra / Super naudingas PHP newbies like me.

    Thanks! Ačiū!


Leave a Comment Palikite komentarą




Leave your Palikite friendly draugiškas comment here. komentarus.

If you have a computer help question, Jei turite kompiuteryje Pagalba klausimą, click here to leave it on the forums Spauskite čia, jei norite palikti jį dėl forumai instead. vietoj.

Note: Your comment may not show up immediately on the site. Pastaba: Jūsų komentaras gali būti rodomas iš karto svetainėje.

Our Friends Mūsų draugai
Getting Started Paruo


About How-To Geek Apie How-To Geek
What Is That Process? Kas yra šis procesas?
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.