4columns foreach php7/30/2023 Here is some sample code that should do what you need. There are always multiple ways to do the same thing. So, try not to make assumptions that the data would have to be put into an array first. You can put the database results into an array, but it is not always necessary. It helps if you are clear on the source data - database. I create one column with while or foreach, but I couldn't figure to create few columns intsead of one long column. You state you want to do this from an array, but then you state this is from a database. Location: Richmond, VA Posted Hi everyone, I am still learning PHP, I am getting better a little, but i am still struggle with while and foreach loop to create few columns. Psycho, I am still learning, I have been research around about PHP language, there are some I don't understand how it works, example - =>, =<, $i , \n, %s, %n, \s.I haven't understand complete, but I am still progress to understand them.Īs I stated, having record go from top down, then from left to right in columns is a little more difficult - but achievable. Do you follow me? If not, my apology because my writing in grammar in English is my second language because I am Deaf, ASL is my first language as usual. But I can increase number of row in column if necessary because I will have almost 200 names on database that I don't want to have their name in one column that can make long column on website, so I will like to have 4 or 5 columns to make less long column on website. I am trying to have start with top, then down till 10th row, then go to other column with start with top, then go on till 10th row, continue.
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |