Jump to content

chaining arrays


Ninjakreborn

Recommended Posts

[b]SOLVED-Problem completely solved thanks for all the help.[/b]I am building a small database with javascript, for recalling information in a mini-program, what I am trying to do, well I don't want to go into all that, What I want to ask is there a way, because I have to put in all the information, is there a way for me to paste information into a document, then with javascript someone automatically turn all the bits of information into an array.
because I am creating about 7 arrays, and wanting them all the be associative arrays pointing to the same keys, for instance
Key 1-has 10 different arrays hooked to it and if I call that 1 then all the information comes for instance
Array 1
[1] baboon
[2]cat
array 2
[1] hairy
[2] 4 legs
array 3
[1]stupid
[2]2 legs
It's not what an array looks like but you get the point, if that 1 is called then it pulls hte information saying baboon, hairy, and stupid.
If I was to use the variable baboon instead of the key selector it still calls all the information, I am wanting to be able to change a lot of information into an array without having to type it all out, then I can just pretty it up, and put in the information and create another array, because javascript automatically indexes them at 0 and above, I will already have the key indexes set, and the arrays will still be callable by those keys.
Any advice would be appreciated thanks.
Link to comment
https://forums.phpfreaks.com/topic/10895-chaining-arrays/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.