Here’s a very useful function to generate a random string in php. I use this function quite often especially while working in core php projects.
Tag: php code
How to debug a php application in production/live mode
How to debug a live website built in php? Here’s a basic, simple and custom method i usually use to debug live or production web applications (web sites). First of all i place the following lines of code in a…
SQL dump file for CakeDC comments plugin for CakePHP
If they (CakeDC people) don’t have complaint of any kind or whatsoever i would like to post the SQL dump code for comments table used in CakeDC comments plugin. Especially, those having problems with generating database table or query through…
Better way to write php code – part 2
With the help of an example i would explain a very common but erroneous approach new php developers seem to follow (i have seen some ‘old’ ones repeating the same error though). Here it is,
Better way to write php code – part 1
A few tips on writing php code that can save a php developer a lot of future troubles and “huffs and puffs” occurring due to different php compiler settings, changing of hosting environment etc. Here is first one.
Spliting CSV (comma seperated) entry grouped by double quotes
By using fgetcsv function we can have well formatted output for csv data without any pain. If you don’t want to use fgetcsv function for some reason and your CSV comma separated entries may contain comma inside except the delimiters,…
Convert month name to month number in php
While working with a CJ run reports script i needed to convert “month name” into “month number” so i could store it in the database in date format. After doing some cleaning stuff i was ending with the month name,…