↓ Archives ↓

Archive → January, 2011

Use PHP MySQL date format correctly

If you ever try to format date in PHP and MySQL, using date (datetime or timestamp) value directly from MySQL to PHP date() function, then you'll get a Notice level error, something like this:

Notice: A non well formed numeric value encountered in ... .. .

Additionally, PHP date() will always return January, 01 1970 if MySQL date is directly used. It means, there is a difference between date in PHP and date in MySQL (i.e. they are not compatible). PHP date function accepts Unix Timestamp,  which is different from MySQL date types (DATE, TIME, DATETIME, TIMESTAMP etc.)

So if you want to change your default MySQL date format (the way it looks) to a more suitable formatting using PHP date() function, then you'll have to convert MySQL date to Unix Timestamp. Continue reading →

Should we index wordpress blog category and tag pages for search engine optimization (SEO)?

If you are running a typical Blog using WordPress, then the answer is no, you shouldn't allow search engines to index your category and tag pages (if you care about maintaining a higher SEO value).

Anyway, here is the reason : Continue reading →

How to run your first PHP CODE

Few beginners asked me this question, so here is the answer (I'll update this post from time to time to meet the visitors' interests):

The easiest way to start with PHP is using XAMPP Continue reading →