What you want is not an array but a map. Look at java.util.HashMap for
instance.

On Sun, Aug 7, 2011 at 2:21 AM, Tommy <[email protected]> wrote:

> Hi,
>
> I've been trying to create my first android app. Number of functions
> and the scripts complexity grow each time I try to finish it, but that
> is the way to learn how to develop an android app.
>
> I'm used to develop webpages using PHP and HTML. In my app I need an
> array that looks something like this:
>   array('Age' -> 1, 'Length' -> 180). This is no problem with PHP,
> but I haven't found out how this can be done in android. Is it
> possible or am i constricted to using integers as indexes? And does
> anyone have an idea to how this can be accomlished if strings can't be
> used as indexes?
>
> --
> Regards, Tommy
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
>



-- 
Romain Guy
Android framework engineer
[email protected]

-- 
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en

Reply via email to