You're here: Home / PHP

Building Dynamic SQL String from Associative Array

It would be nice to have functions that convert associative arrays to SQL queries. Such a function will save our time from building queries. The functions take two main parameters, the name of the table and the data to be inserted in associative array. Read more

Converting Tag's Properties Into Associative Array

You've fetched an HTML page and your code needs to read the properties of the some tags in it. Learn how to convert tag's properties into associative array using this code. Read more

Displaying Sequential Images with Pagination

Display your sequential images and the pagination with this code snippets Read more

Getting File's Extension with Regular Expression

Getting file's extension is not as easy as it looks. This is because there is no strict format for file extensions. To obtain the extension from file names, you have to use regular expression. See the following example. Read more

Starting Zend Framework

After building lots of projects, I realize that I spend a lot of time just to writing repeating (and boring) code; select, insert, delete, and update rows. I have to find a way to increase my coding speed, and I choose Zend Framework. Read more

Displaying Random Quotes

Displaying random quotes is the easiest thing to do with PHP. But in case you don't know how, here it is. Read more

Get Summary From a Long Paragraph

If you have recent news you want to display in your homepage, you might want to display only the summaries--a short paragraph with only 20-25 words. Read more

How to Read Command Line Arguments from Your Script

Writing scripts that run from command line is sometimes useful. It gives us more flexibility rather than scripts that called from web browsers. But passing parameters to these scripts is a little different. Learn how to read command line arguments from your script. Read more

Smileys2Emoticons - Display Emoticons in Your Guestbook!

Emoticons are very popular in the Internet these days. It seems like now every forums, mailing lists and guestbook support emoticons in their pages. If you write such applications, why not add them too? Read more

Page Indexing - Get The Title and Meta Tags From All of Your Pages

I'm doing some projects to help webmasters maintain their sites. Some of these tools include: Link checker, Del.icio.us auto submitter and many more. One of the components I need is a web crawler/spider to build a page index, which will be used by the higher level components to perform their tasks. Read more