It is perfectly possible to insert this into a database, provided the database structure allows "one-to-many" relationships. You will need at least two tables for this to work: one to hold the key and individual data for this key and another table to hold the repeated data.

A typical example would be: one table to hold the ISDN code (key) and title of a book and another table to hold a sequence number, the ISDN code and the name of the authors (one author per record). Thus it is easy to accommodate multiple authors for one book.


A program should be light and agile, its subroutines connected like a string of pearls. The spirit and intent of the program should be retained throughout. There should be neither too little or too much, neither needless loops nor useless variables, neither lack of structure nor overwhelming rigidity." - The Tao of Programming, 4.1 - Geoffrey James

My blog: Imperial Deltronics

In reply to Re: access array of values without a loop by CountZero
in thread access array of values without a loop by spie287

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":