SQL Command to Change Column Order in a MySQL Table

Sometimes you need to change column order in a table. If you don’t have access to latest phpmyadmin version (4.0 and above), you don’t have any graphic solution to do this and you’ll have to use an SQL query. First of all, you need to identify the type of field you want to move. It should look like… Read More »

How to Open Links in a New Tab in Hesk 2.5.2

If you have used Hesk before, you must have mentioned that all links that were posted by users at the time of ticlet creation/reply were opening in new tabs. If you decide to update to 2.5.2 (I was using version 2.3 before), you will notice that all links will be opening in the current tab. If you want… Read More »

How to add IMAP Support for PHP in Centos x64

If you need to install IMAP support for php on a 64-bit machine, it is not that simple. There are some additional steps you need to follow to make it working. First of all, you may try to reconfigure PHP. If you have Directadmin or any other control panel installed, you might have imap library installed. Just add… Read More »

How to Show Only Duplicate Values From an Array With PHP

If you have an array with duplicate values, sometimes you might need to show only non-unique elements. Here is a short code in PHP that will allow you to do this. <? $arr=array_map(“trim”, file(“file.txt”)); $nonuniq=array_unique(array_diff_assoc($arr, array_unique($arr))); ?> This will return unique array of duplicates. If you need to show all duplicated values, use this code. <? $arr=array_map(“trim”, file(“file.txt”));… Read More »