---
title: "Array"
type: "forum-thread"
url: "https://www.webforum.nu/amne/php/155529-array"
topic: "PHP"
topic_url: "https://www.webforum.nu/amne/php"
author: "Jet-li"
published: "2007-01-03T23:44:10.000Z"
updated: "2007-01-03T23:44:10.000Z"
replies: 0
views: 169
page: 1
pages: 1
language: "sv-SE"
site: "webForum — webforum.nu"
rights: "Upphovsrätten till varje inlägg tillhör dess författare."
attribution: "Citera som: webForum, https://www.webforum.nu/amne/php/155529-array"
---

# Array

## #1 — Jet-li, 2007-01-03T23:44Z

Hur får man ut värdena i en sådan här array?
Har testat:

echo $data\[0\]\['name'\];

men det vill inte fungera.....

\[PHP\]
\*\* Database of AminoAcid objects:
Array
(
    \[0\] =\> aminoacid Object
        (
            \[name\] =\> Alanine
            \[symbol\] =\> ala
            \[code\] =\> A
            \[type\] =\> hydrophobic
        )

    \[1\] =\> aminoacid Object
        (
            \[name\] =\> Lysine
            \[symbol\] =\> lys
            \[code\] =\> K
            \[type\] =\> charged
        )

)
\[PHP\]

Permalänk: https://www.webforum.nu/p/155529

---

Tråden på webben: https://www.webforum.nu/amne/php/155529-array
