3 Votes Vote

Going through PHP array

Posted by topdog 428 days ago Questions| array data php array All

I have a php array I would like get a specific data from it.

 [vxs_data] => Array
    (
        [0] => Array
            (
                [data] => Array
                    (
                        [0] => fsafas
                        [1] => 603
                        [2] => 39
                        [3] => 81
                        [4] => 12
                        [5] => 43
                        [6] => 186
                        [7] => 97
                        [8] => 129
                    )

            )

        [1] => Array
            (
                [data] => Array
                    (
                        [9] => fsdfsa
                        [10] => 60
                        [11] => 30
                        [12] => 184
                        [13] => 12
                        [14] => 7
                        [15] => 176
                        [16] => 132
                        [17] => 119
                    )

            )

        [2] => Array
            (
                [data] => Array
                    (
                        [18] => fsafsa
                        [19] => 60
                        [20] => 3121
                        [21] => 18
                        [22] => 11
                        [23] => 0
                        [24] => 199
                        [25] => 140
                        [26] => 117
                    )

            )

        [3] => Array
            (
                [data] => Array
                    (
                        [27] => dada
                        [28] => 60
                        [29] => 27
                        [30] => 11
                        [31] => 22
                        [32] => 1
                        [33] => 22
                        [34] => 157
                        [35] => 98
                    )

            )

        [4] => Array
            (
                [data] => Array
                    (
                        [36] => ASKLMSDAS
                        [37] => 60
                        [38] => 232
                        [39] => 11
                        [40] => 23
                        [41] => 4
                        [42] => 32
                        [43] => 141
                        [44] => 98
                    )

            )

The content of array about that. I would like to get that data in to table (td) so it would be like this:

<tr>
    <td><a href="#">ASKLMSDAS</a></td><td>33</td>...
</tr>
<tr>
    <td><a href="#">dada</a></td><td>33</td>...
</tr>

So I would like a make link of those first data columns like "ASKLMSDAS" "dada". So I need to do some sort of if clause maybe and foreach?

Thanks so much and sorry about my english.

Originally asked by: marvindarvin on Stack Overflow

Discuss Bury


Who Voted for this Question