Unset an array item in javascript

Suppose you have an array my_array.

To unset an item of my_array just use the following:


where index is the key of the value of my_array which you want to unset.

Leave a comment

Posted by on December 29, 2011 in javascript


Tags: ,

Styling checkbox, radio button and select box

In a project i need to styling the checkbox, radio button and select button. I am not so strong in design and html :). Then searching in google and found a great site. I like it and works great in cross browser. The url is

Leave a comment

Posted by on December 29, 2011 in styling


Tags: ,

Renaming file name in the file uploading process in ZF

The following code works for me to rename a file name in the uploading process in zend framework.

$fileTransferObject = new Zend_File_Transfer_Adapter_Http();
$uploadDir = 'your_upload_directory';


$renameFilter = new Zend_Filter_File_Rename( $uploadDir );
$files = $fileTransferObject->getFileInfo();
$time = microtime();
$timeArray = explode(‘ ‘ , $time);
$timeStr = $timeArray[1];
foreach($files as $fileID => $fileInfo)
$renameFilter->addFile( array(‘source’ => $fileInfo[‘tmp_name’], ‘target’ => $timeStr.’_’.$fileInfo[‘name’], ‘overwrite’ => true ) );
//check file recieved successful.
if (!$fileTransferObject->receive()) {
$messages = $fileTransferObject->getMessages();

Leave a comment

Posted by on August 8, 2011 in ZF


Tags: , ,

Easy way to find facebook page admin or user id

Facebook Like Box and some other plugins require admin id for meta information.

Suppose for like button plugin required admins id in the meta information:
So if you create your page by your facebook account then at first login to facebook. Find account tab from the top right navigation bar. Click on down arrow symbol besides account and then click on account settings. Then you will find

Username :
So your_id_name is your admin id or user id.

Leave a comment

Posted by on August 1, 2011 in Face Book


How do you move the close button to the top right corner in shadowbox 3.0+?

In the development process sometimes our client request us to use shadowbox to view larger image in popup box. Normaly the cross button placed at the bottom right of the box. But when we need to place the cross button at the top right corner then we can do it very easily by the following way.

onOpen: function() {
modal : true


Posted by on July 30, 2011 in JS Plugins