I have an array with urls and I want to echo each url in the array in columns and rows, but I only know how to do this when the data is in a DB, but how do I go through an array that is not in a database?
Can you show an example how it will look like by columns and rows?
Also, can you give us some idea on the array you are using? It would help us help you…
But, basically, to do this, you would loop thru all of your links and display them one link at a time.
The loop would have a pointer to point into the array. This is incremented each time you display
a link so it points at the next link. You would have to count the cols and when reach the last one,
add a “
” to the end of it to move to the next line. This can be done in a hundreds ways. One
easy way is to use two “for” loops. The outside loop would be the rows and the inside loop would
be the cols. You could also do this inside of a table which would look a bit nicer. Or, you could use
CSS to format the links to look nice.
As we said, it is hard for us to help you without some sample of your current code and array…
Good luck…