PHPSuperBlog.com

Change the MySQL database table encoding to UTF8 with PHP

In some cases, where you forgot to change the MySQL database table encoding to UTF8 when creating but you need to insert some text such as Chinese or other Asian languages which require UTF8 into the MySQL. Also you might not have a MySQL user control interface such as phpmyadmin to make it easy for you, and so what should you do?? Let’s create a PHP file to do the job, and here is an 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 →

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 →

Find the number of column (field) of a table in MySQL database

To find and print out the number of column (field) of a table in MySQL database, we have to use a php function “mysql_num_fields()” to get the number and to use a variable to store the result, here I have created an example to demonstrate how to do so: Continue Reading →

  • Categories

  • Useful Downloads