There is your client, complaining that they can’t see the changes you just made to their website. You explain them that they need to delete their browser cache in order to properly visualize the modifications. They said they don’t know how, and this is when you lose your patience and decide for a more radical […]
Lets face it. Responsive design is here to stay and it is the solution to all of our nightmares regarding mobile web design. For those who are not aware of this technique, I invite you to read my other post where I explain what it is. But lets get to the point. Sometimes we need […]
I was developing a website where people would place horse bets and the system should be able to calculate all the possible permutations based on the user selection. That means: finding all the possible combinations in a two dimensional array. I found a couple of functions but none of them would keep the array keys […]
CodeIgniter lacks of an error handling class for custom errors. The Form Validation class is very nice for forms, the logs are pretty useful as well, but what happens when we need to handle our own errors?. Currently there is no official solution for this so I decided to take the matter in my own […]
Most of the time my clients need to download data from their database tables. Exporting to CSV is a pain in the rear for users and it leads to confusion (you know the colon and semicolon stuff). Today, I decided to make a very small controller that is portable and efficient for exporting full MySQL […]
With CodeIgniter 2, plugins are no longer an option. Usually you would just add the Facebook PHP SDK as a plugin and you were good to go, but now, you need to make a little modification to the SDK in order to use Facebook Connect on your CodeIgniter application. Lets start by explaining what is, […]
Reading Word documents with PHP on a Linux box can be a real pain. It requires DOM which is only available on the Windows platform. However, Unkwntech from Stack Overflow made quite a nice function to read Word documents and extract its information. It will only parse text content, but it is enough for most […]
With all this load of smartphones and tablets, it is mandatory for us as developers to optimize our content as much as possible so everybody can see it, no matter what device they are using. This is why I wrote a small but powerful function to properly detect a wide range of mobile devices and […]
I needed to download some files from a remote FTP server and the store them in my website. The usual way would be to download all the files to my computer and then upload them to my website. In CodeIgniter 1.7.2 you would have to do this, however, the new CodeIgniter 2.0 has a new […]
We don’t like reading chopped sentences like “Star Wars Old Republic is be….”. It looks fugly. Usually, when trimming text you will go with substr(), but there is a much better way to do it, and believe me, you trimmed text will look so much better than before.
CodeIgniter 2.0 is coming out soon, so lets start studying the changes done to the HTML Table Class in the dev-release. One of the most requested features was the ability to set tag attributes to individual cells. On CI 2.0 this is completely possible, however, since the documentation is not fully updated yet, I decided […]
It happened to me a lot of times, I had my connection set to UTF-8, my database was UTF-8, even my tables and every single field, however, for some reason, the information I updated in phpMyAdmin wasn’t being displayed correctly on my website and the information edited on my website wasn’t being displayed correctly in […]
Pulling code from here and there, I gathered enough information to create a small function that allow you to pull your Twitter feed and display it in your website. What you do is basically call the function and pass a couple parameters. The styling can be done with CSS.
I know there are several ways to accomplish this, however, of all the ones I’ve tried, this is the shortest so far: So, if you make two classes, row1 and row2, each with a different background color, the result will be alternated row colors in whatever you’re doing. Very useful for long lists. Update: you […]