I am a junior web developer experienced in PHP, Jquery, MySql, Smarty Template, jQueryMobile, Yii Framework

04 August 2013 ~ 0 Comments

PHP – generate months and years dropown box the smart way


To generate 12 months drop down

To generate years drop down from current year to the next ten years


04 August 2013 ~ 0 Comments

Yii redirect to previous page


To redirect to the most recent/previous page, simply use the below


02 August 2013 ~ 0 Comments

Ubuntu 12.04 LTS – remove php suhosin warning – PHP Startup: Unable to load dynamic library ‘/usr/lib/php5/20090626/suhosin.so’

By default, Suhosin comes with PHP installation. Long story short, if you have Suhosin, your PhpMyAdmin will complain, you php error.log spill out suhosin warning, your php console script insults you with suhosin warning. To remove the annoying warning

You have to remove/purge suhosin by doing the following


30 July 2013 ~ 0 Comments

jQuery – select first or last child element of a parent element

Easy as using :first or :last selector. To select first element

To select last element

26 July 2013 ~ 0 Comments

remove x characters at the end and y characters at the front of a string


This is a common tasks. All you need is php substr. 1. To remove at the some characters at the front of a string

2. To remove some character at the end of a string

3. Finally, if you want to do it in one shot


25 July 2013 ~ 0 Comments

Remove the default sorting/searching in CGridView


Simple as rewrite each element in the CGridview using


30 August 2012 ~ 0 Comments

PHP – remove x number of characters from a string


Simply use PHP substr function to do the dirty jobs for you.

This brings up a good question people usually ask. How do I remove the trailing comma at the end of a word, a string ?

07 August 2012 ~ 0 Comments

unable to find the requested .net framework data provider. it may not be installed

I follow the asp.net tutorial on Microsoft website to learn ASP.NET MVC. [http://www.asp.net/mvc/tutorials/getting-started-with-aspnet-mvc3/cs/accessing-your-model's-data-from-a-controller] Interesting enough, I’ve encountered a bug that alot of new beginner having trouble with. The devil unable to find the requested .net framework data provider. it may not be installed. I’ve spend couple hours to figure this out and I hope it [...]

10 July 2012 ~ 0 Comments

How to find large files in linux

Often, you want to free up your server , so you scratch your head and wonder what is the biggest files you have. With this simple command, you will find out how humongous your files are.

For example: To find any files bigger than 50 MB

Source: http://www.cyberciti.biz/faq/find-large-files-linux/

30 June 2011 ~ 0 Comments

How to check undefined variable in Javascript

Hi folks, this comes up so often that I want to share with you on how to ‘properly’ check a variable is undefined.  

Both ways will work. Credits goes to open source communities and all developers sharing their works.