Here’s where I am:
I started with an array…cleaned it up using ‘regex’.
Now I have this…each item has three values
- mystring = 4|black|cat, 7|red|dog, 12|blue|fish
Here’s where I want to be:
I want to end up with three arrays.
- array1=(“4″,”7″,”12”)
- array2=(“black”,”red”,”blue”)
- array3=(“cat”,”dog”,”fish”)
I also want to do this without leaving the page…preferably using javascript
I understand the theory, but I’m getting tangled in the syntax.
I’d use John Resig’s famous “search and don’t replace” method here, it’s perfect for it:
Example