A web developer's blog. PHP, MySQL, CakePHP, Zend Framework, Wordpress, Code Igniter, Django, Python, CSS, Javascript, jQuery, Knockout.js, and other web development topics.

Tag Archives: tutorials

Zend_View Helper Tutorial

Zend DevZone has a new article up. What is a View Helper? A View Helper is simply a class that follows particular naming conventions, When attached to a view object, you can call the helper as if it were a … Continue reading

Posted in General | Tagged , , , | Leave a comment

Zend Framework Blog Application Example / Tutorial

This is useful to those who are trying to kick start a Zend Framework application. Starting any new application is like walking into a shop and being dazzled by the displays. You want everything but finally realise you only have … Continue reading

Posted in General | Tagged , | 4 Comments

Simple PHP + AJAX + XML Chat Tutorial

A short but complete tutorial on how to write a Chat Application using PHP, AJAX and XML. Developers talk a lot about community when the term Web 2.0 comes up. And whether you think it’s hype or not, the idea … Continue reading

Posted in General | Tagged , , , | Leave a comment

Get Difference Between 2 Dates Using PHP

Here is how to get the difference between two dates in PHP. … public static function toTimestamp($date){ $arrayDate=self::toArray($date); return mktime($arrayDate[’hour’],$arrayDate[’minute’],$arrayDate[’second’],$arrayDate[’month’],$arrayDate[’day’],$arrayDate[’year’]); }   public static function dateDiff($date1,$date2,$unit=’HOUR’){ $date1=self::toTimestamp($date1); $date2=self::toTimestamp($date2);   $secs=$date1-$date2;   switch(strtoupper($unit)){ case ‘WEEK’:return $secs/60/60/24/7; break; case ‘DAY’:return $secs/60/60/24; break; … Continue reading

Posted in General | Tagged , | Leave a comment