PHP get first day of current month, datepicker friendly

December 22, 2014

The simplest and readable way to do it is using this clean solution. All you need is a string represent the date. First day of the month: Last day of the month:

Magento checkout Paypal change “What is PayPal text

December 14, 2014

The Magento checkout “What is PayPal” text is code in this file, as well as paypal logo /app/design/frontend/base/default/template/paypal/payment/mark.phtml Ideal way to make changes is copy this file with same path in your theme and modify this file according to requirements. Example your theme is: yourtheme /app/design/frontend/default/yourtheme Then in template folder create same path as “paypal/payment” […]

MySql find all tables with specific column/field name

December 8, 2014

How to look up in the entire DB and list out all tables which have specific column name or field name? Example belows looks for field `currency` from all database: To add specific database to the query, use:

PHP script execution time tracking wallclock time

December 1, 2014

A simple way to find out execution time of php script without lots of calculation is tracks the wallclock time. Compare to tracking CPU time, it also include time that PHP is sat waiting for external resources such as disks or databases, which is not used for max_execution_time. Output: Execution time get user: 0.00023317337036133