Category Archives: PHP

Howto: Create and Stream a CSV with PHP

I find myself constantly creating csv files for users to download. Whether it’s a method for users to export their data to excel, a way for users to backup their hosted data, or just a simple way to send them … Continue reading

Posted in PHP | Tagged , , | 8 Comments

Can open source eCommerce contend?

It seems that sometimes work comes in waves. I haven’t dealt with setting up a shopping cart on a site in quite a while, and now I have three clients that I’m setting up shopping carts for. The clients want … Continue reading

Posted in PHP, Web Design | Tagged , , , , , , | 4 Comments

PHP function to Redirect a user with a message

One of the common things that you need to do in PHP is redirect a user, and display a message on whatever page you are sending them to. There are a lot of reasons for this, but the most common … Continue reading

Posted in PHP | Tagged , | 14 Comments

Replace every other occurrence with str_replace

Well, someone put some code onto the str_replace PHP manual page to replace every other occurrence of a string with another string. However, it didn’t work, and was simply spam to get a link onto the PHP manual page (shame … Continue reading

Posted in PHP | Tagged | 3 Comments

PHP Pagination with mysqli

I’m asked pretty regularly for help with pagination in PHP. I have a nice mysqli pagination class that I use. Once it’s implemented, it is used like this:

Posted in PHP | Tagged , , | 15 Comments