Author Archives: Lalit

MySQL Union is column name and data-type agnostic

I stumbled upon a rare care while working on one of my projects. The data in one of my variables in PHP was being jumbled up. It took an hour of debugging my PHP code till I realized the the … more

Tags: , ,
Posted in lab | 4 Comments
• • •

Greedy Regular Expressions

By default the pattern matching in regular expressions is greedy in nature. The regex engine will try to match the largest string possible for the given expression rather than the first smallest match, which may not be desired behavior every … more

Tags: , ,
Posted in lab | Leave a comment
• • •

Base62: Convert a number to base 62 for short URLs in PHP

Base62 is a PHP class to convert a number to and from any base between 2-62. There is no native function in PHP to convert upto base 62. The native function base_convert converts numbers upto base 36, ie. using 0-9 … more

Tags: , , , ,
Posted in lab | Leave a comment
• • •

XML2Array: Convert XML to Array in PHP

XML2Array is a class to convert XML to an array in PHP. It returns an array which can be converted back to XML using the Array2XML class. It can take a string XML as input or an object of type … more

Tags: , , , ,
Posted in lab | 4 Comments
• • •

Array2XML: convert PHP Array to XML (with attributes and CDATA)

Array2XML is a class to convert an array in PHP to XML. It allows you to parse a multidimensional array into XML including attributes unlike other scripts available on the internet. It returns the XML in form of DOMDocument object … more

Tags: , , , ,
Posted in lab | 45 Comments
• • •

Dish TV Password Menance

I got a new Dish TV HD connection. Watching Live Cricket in HD is a very amazing experience. I tried to create a new online account to manage subscription etc. Immediately after signup (choosing a new password at the time … more

Tags: , , , , ,
Posted in blog | 1 Comment
• • •

Talk: Facebook Platform Best Practices

My talk at Facebook Developer Garage at Bangalore on 10th Oct 2010. The talk was about how to make your application grow viraly on Facebook and few best practices to retain your users. Slideshow (view on SlideShare) Photos

Tags: , , ,
Posted in lab | 1 Comment
• • •

Ternary nuances in PHP

Yesterday while working on one of my projects, I came across a weird scenario: a very simple statement written in PHP was not behaving the way it should. Below is the simplified version of the code I was working with: … more

Posted in lab | 1 Comment
• • •

Vacation Relaxation?

exactly how I feel

Tags: ,
Posted in inspiration | Leave a comment
• • •

Looking for Geek Ninjas

There is always so much to do in a startup that people won’t be too picky about your paper qualifications, if you can solve problems for them without screwing up. – Paul Graham My startup BitRhymes is looking for such … more

Tags: , ,
Posted in blog | Leave a comment
• • •