Uutiset:

Want to get involved in developing SMF, then why not lend a hand on our github!

Main Menu
Advertisement:

Go through mysql result twice?

Aloittaja cddude, kesäkuu 18, 2014, 06:17:42 AP

« edellinen - seuraava »

cddude

Hey.

How would I go about doing this?


while ($row = $smcFunc['db_fetch_assoc']($request)){
...
}
...
while ($row = $smcFunc['db_fetch_assoc']($request)){
...
}


Thanks.

Dragooon

Why do you need to go twice? Just run through it once and cache it into another array.

cddude

Hmm, so I would need to put it into a 2d array?
Sorry, I'm quite new to php.

cddude


Dragooon


Advertisement: