FUDforum
Fast Uncompromising Discussions. FUDforum will get your users talking.

Home » Imported messages » comp.lang.php » Is my array understanding correct?
Show: Today's Messages :: Polls :: Message Navigator
Return to the default flat view Create a new topic Submit Reply
Re: Is my array understanding correct? [message #178782 is a reply to message #178780] Thu, 02 August 2012 18:28 Go to previous message
Michael Fesser is currently offline  Michael Fesser
Messages: 215
Registered: September 2010
Karma:
Senior Member
.oO(richard)

> <?php
>
>
> $artistsA = array(
> "A.B. Skhy" => array("chart"=>"Camel Back","Flip"=>"Just What I
> Need","Label"=>"MGM K14086","Date"=>"12/8/69"),
> "Aaron Neville" => array("chart"=>"She Took You For A Ride","Flip"=>"Space
> Man","Label"=>"Parlo 103","Date"="3/25/67",
> "chart"=>"Tell It Like It Is","Flip"=>"Why
> Worry","Label"=>"Parlo 101","Date"=>"12/3/66")
> );
> ?>
>
> Eventually, the output will look just like this page does now.
> http://mroldies.net/Artists-A1.html
>
> Each time a new "artist" table is created, the code will produce the
> required rows and columns.
> Question is, is it proper to have the key names as I show?
> Or do I need to uniquely identify each key value somehow?

Only problem will be artists of the same name, so a unique numeric key
might be better. But why don't you use a database?

If you want to stick with the arrays, you could use a single array for
all artists, sorted by name.

Micha

--
http://mfesser.de/
Fotos | Blog | Flohmarkt
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: ncurses on Linux how to capture F1 key?
Next Topic: str_replace, replace array with string AND array
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ]

Current Time: Fri Sep 20 06:34:01 GMT 2024

Total time taken to generate the page: 0.05206 seconds