Forums
This topic is locked
convert a 2d array to a string
Posted 03 Jun 2003 15:17:08
1
has voted
03 Jun 2003 15:17:08 Matthijs Horsman posted:
hello all..I got a 2d array and i want to convert it to a string...
The array looks like
<pre id=code><font face=courier size=2 id=code>Array
(
[x] => Array
(
[1] => Array
(
[0] => -126
[1] => -127
[2] => -128
[3] => -129
[4] => -130
[5] => -133
[6] => -134
)
[2] => Array
(
[0] => -74
)
[3] => Array
(
[0] => 3
[1] => 2
[2] => 1
[3] => 1
[4] => 0
[5] => -4
)
[4] => Array
(
[0] => -54
[1] => -57
)
[5] => Array
(
[0] => -184
[1] => -184
[2] => -185
[3] => -186
[4] => -187
[5] => -188
[6] => -188
[7] => -188
)
[6] => Array
(
[0] => 97
)
)
[y] => Array
(
[1] => Array
(
[0] => -62
[1] => -63
[2] => -63
[3] => -63
[4] => -63
[5] => -63
[6] => -62
[7] => -60
)
[2] => Array
(
[0] => -144
)
[3] => Array
(
[0] => -65
[1] => -65
[2] => -65
[3] => -63
[4] => -62
[5] => -56
)
[4] => Array
(
[0] => -152
[1] => -150
)
[5] => Array
(
[0] => -63
[1] => -58
[2] => -57
[3] => -55
[4] => -47
[5] => -45
[6] => -42
[7] => -38
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle> => -37
[9] => -36
)
[6] => Array
(
[0] => 172
)
)
[size] => Array
(
[1] => Array
(
[0] => 4
[1] => 4
[2] => 4
[3] => 4
[4] => 4
[5] => 4
[6] => 4
[7] => 4
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle> => 4
[9] => 4
)
[2] => Array
(
[0] => 4
)
[3] => Array
(
[0] => 4
[1] => 4
[2] => 4
[3] => 4
[4] => 4
[5] => 4
[6] => 4
[7] => 4
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle> => 4
[9] => 4
)
[4] => Array
(
[0] => 4
[1] => 4
)
[5] => Array
(
[0] => 4
[1] => 4
[2] => 4
[3] => 4
[4] => 4
[5] => 4
[6] => 4
[7] => 4
<img src=../images/dmxzone/forum/icon_smile_8ball.gif border=0 align=middle> => 4
[9] => 4
[10] => 4
)
[6] => Array
(
[0] => 4
)
)
[color] => Array
(
[1] => Array
(
[0] => 9830424
[1] => 9830424
[2] => 9830424
[3] => 9830424
[4] => 9830424
[5] => 9830424
[6] => 9830424
)
[2] => Array
(
[0] => 9830424
)
[3] => Array
(
[0] => 16776432
[1] => 16776432
[2] => 16776432
[3] => 16776432
[4] => 16776432
[5] => 16776432
[6] => 16776432
[7] => 16776432
)
[4] => Array
(
[0] => 16776432
[1] => 16776432
)
[5] => Array
(
[0] => 15435790
[1] => 15435790
[2] => 15435790
[3] => 15435790
[4] => 15435790
[5] => 15435790
[6] => 15435790
)
[6] => Array
(
[0] => 15435790
)
)
) </font id=code></pre id=code>
the string shoud look like x1,y1,color1,size1;x1,y1,size1,color1 etc...
any body has any clues for me??
TIA
Matthijs
----------------
DWMX/W-XP-PRO/IIS/ASP-VB/MS-SQL
Replies
Replied 03 Jun 2003 20:05:02
03 Jun 2003 20:05:02 Jake Henak replied:
Couldn't you create an object and assign that array to the object. Then you could call the value functions of the object into a string
MyArray.("6"
.Value, + " ", + MyArray. ("7"
.Value
I don't know the exact answer so feel free to flame me if I'm wrong,but that may point you in the right direction. I'm just learning VB. I know PHP <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> but pretty weak in VB.
MyArray.("6"


I don't know the exact answer so feel free to flame me if I'm wrong,but that may point you in the right direction. I'm just learning VB. I know PHP <img src=../images/dmxzone/forum/icon_smile.gif border=0 align=middle> but pretty weak in VB.