JS text to array

Posted by Sonny on Stack Overflow See other posts from Stack Overflow or by Sonny
Published on 2011-01-01T15:37:27Z Indexed on 2011/01/01 15:54 UTC
Read the original article Hit count: 232

Filed under:
|
|

Hi i got this text

2/92/20
3/32/32
4/62/6
5/22/28
6/60/61
7/33/32
8/34/31
9/31/19
10/19/19
11/34/39
12/32/32
14/19/25
15/45/37
16/32/32
17/84/36
18/72/33

and i need it to be like

// 2/92/20
chars[0][0]=2;
chars[0][1]=92;
chars[0][2]=20;

How should i make that

PS: the split must be in

$.ajax({   

type: "POST", url: "char_info2.php",
dataType: "html",
success: function(data) { //here }

© Stack Overflow or respective owner

Related posts about JavaScript

Related posts about text