# Convert one text structure to another

**URL:** <https://forum.kirupa.com/t/convert-one-text-structure-to-another/292815>\
**Category:** flash\
**Created:** [July 19, 2009, 5:13pm UTC](https://forum.kirupa.com/t/convert-one-text-structure-to-another/292815 "2009-07-19T17:13:42Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![minopharma](https://avatars.discourse-cdn.com/v4/letter/m/a9adbd/32.png) [@minopharma](https://forum.kirupa.com/u/minopharma)\
**Post date:** [July 19, 2009, 5:13pm UTC](https://forum.kirupa.com/t/convert-one-text-structure-to-another/292815/1 "2009-07-19T17:13:42Z")

</div>

Hi,

I’m trying to convert this text structure:

```php

COLA COLB COLC COLD
 1.00000 2.00000 3.00000 4.00000
 5.00000 6.00000 7.00000 8.00000
 9.00000 10.00000 11.00000 12.00000
13.00000 14.00000 15.00000 16.00000

```

into this text structure:

```php

"comp" 4
1.00000 ;COLA
2.00000 ;COLB
3.00000 ;COLC
4.00000 ;COLD
"comp" 4
5.00000 ;COLA
6.00000 ;COLB
7.00000 ;COLC
8.00000 ;COLD
"comp" 4
9.00000 ;COLA
10.00000 ;COLB
11.00000 ;COLC
12.00000 ;COLD
"comp" 4
13.00000 ;COLA
14.00000 ;COLB
15.00000 ;COLC
16.00000 ;COLD

```

How to do this? I know how to transpose the values, but I don’t understand how to obtain the needed structure.

Any help will be appreciated!

Thanks,  
minopharma
