Welcome Guest, Not a member yet? Register   Sign In
Desires and elegant foreach for a messy array
#1

[eluser]pdxbenjamin[/eluser]
My array looks something like this...
Code:
Array
(
    [0] => 1
    [1] => 2
    [2] => 3
    [3] => 4
    [4] => 5
)

When I foreach through them I get...
Code:
1
2
3
4
5

That isn't my problem, what I have is an update running at the end of each iteration.
Code:
1
<- UPDATE
2
<- UPDATE
3
<- UPDATE
4
<- UPDATE
5
<- UPDATE

How do I make it a collective so I can format the string, and make one Update.
I'd like to have the final result. 1, 2, 3, 4, 5



Thanks.


Messages In This Thread
Desires and elegant foreach for a messy array - by El Forum - 02-02-2012, 09:15 PM
Desires and elegant foreach for a messy array - by El Forum - 02-02-2012, 09:35 PM
Desires and elegant foreach for a messy array - by El Forum - 02-02-2012, 10:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB