Jump to content


Photo

chaining arrays


  • Please log in to reply
3 replies to this topic

#1 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 31 May 2006 - 08:36 PM

SOLVED-Problem completely solved thanks for all the help.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.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#2 radox

radox
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 31 May 2006 - 10:55 PM

why don't you just use a multi-dimensional array

array[0][0]='babbon';
array[0][1]='hairy';
array[0][2]='stupid';

#3 Ninjakreborn

Ninjakreborn
  • Members
  • PipPipPip
  • Information Technology Specialist
  • 3,922 posts
  • Age:33

Posted 01 June 2006 - 01:00 PM

Because I can't type out a thousand lines of code to do it, that is what made me not do it in the first place.

------

Business Website: http://www.infotechnologist.biz

Personal Website: http://www.joyelpuryear.com

Blog Site: http://www.realmofwriting.com
Services: Web development, application development, mobile development, and custom development. All services listed on my website.


#4 radox

radox
  • Members
  • PipPipPip
  • Advanced Member
  • 31 posts

Posted 01 June 2006 - 02:10 PM

post your current code




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users