PHPSuperBlog.com

Insert all array elements into MySQL database table’s different fields

Array is a good way to store many elements, but in some operations you might like to store all of the elements in a array into different field of a table in a MySQL database. To store into different row, we can use a for loop to go through each elements and run a query to insert them 1 by 1 but insert into different fields is another story. Let me show you how in this example: Continue Reading →

Join all elements of an array together and become a string

In an array, there are many elements in it. But in some operations, you might like to join all the elements within an array to become a string and use the string for other use, how can this be done?? There is a function of PHP can do the job, which is implode( ). Let me show how to do so: Continue Reading →

Refresh page with PHP function header()

In my past post Redirect page using PHP function header(), I talked about how to redirect page with header() function. To refresh a page, I could think of using the same function, just redirect the page to itself, and it has the refresh effect. Continue Reading →

Display all field (column) names of a table in MySQL database

I mentioned before in my previous post Display data from MySQL with PHP which I demonstrated how to display the data of a row within a table, now I want to demonstrate how to display and print out all field names (column names) of a table within a MySQL database. Continue Reading →

  • Categories

  • Useful Downloads