This is the only PHP script that I wrote and use nearly everyday but never published! My stopwatch / timer script… I use it to test, benchmark most of the other scripts I write.
Tag: PHP
Abbreviation: PHP: Hypertext Preprocessor.
Search a Multidimensional Array
Searching a PHP array was not as simple as I had thought. Sure, you can use array_search()
but that only finds one value off an array the last time I tried it out. I needed something to search a multidimensional array, for example… I tried many things before I finally figured it out!
Formatting Dates in MySQL
When you want to format dates stored in a MySQL database to output onto your web pages, you have a choice; either do it with PHP or do it directly in the MySQL query itself.
How to insert records of data into more than 1 database table in MySQL at a time?
When I first started coding PHP scripts for myself, without researching further, I simply assumed that I had to INSERT
data into multiple tables by inserting part of the data into 1 table, query that table to get that just inserted data’s record ID and then do another INSERT
on the next table and so on.
Creating a multidimensional array is quite simple as long as you get over the initial confusion learning to create or work with one.
Create a MySQL Table with PHP
One thing I often asked myself, when I first started programming in PHP, was How do I create a MySQL database table with PHP?
Of course, I have come a long way since then, and creating a MySQL table from within a PHP script is no longer a mystery to me.
Random Rows in MySQL
I have to admit that I had quite some trouble figuring out how I could get MySQL to return some random rows in a query. It was something I had to figure out for myself when I wanted to get a list of random web sites off GIDTopsites to place on these pages here.
Parsing PHP in .HTML Files
Is parsing PHP in web pages that end in .html or .htm possible? Absolutely!
Compress Your Web Page
In my never-ending quest to get my web pages to load super-fast I chanced upon ob_gzhandler()
one day while researching the uses of ob_start()
in PHP.