PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
I have an array called $select. The following script works just fine, however, I wanting to put the result into a variable instead of displaying it on a web page. How can i do this?
That will append whatever the value of $select[$i] is to the end of everything else in $array_data so far, and then loop back and do it again. It will leave an extra (and possibly unwanted) comma at the very end, but you could fix this with a simple if ($i == $numbercount) inside the loop.
Unipus : this variation of what you said does it all automatically, and seems to me to be more efficient, though i'm not positive there's an difference