Flabby Rabbit | The offical home of The Rabbit
Running a function after page execution
“Registers a callback to be executed after script execution finishes or exit() is called.” – php.net Here is a simple class to show the execution time of a page: <?php class logger { private $exec_start, $exec_time; function [...]
WordPress Integration
While working on a new site I found the need to integrate wordpress into the design. I first set about looking at WP databases, but they seemed very empty and bit unorganized. So I looked into the “correct” way of doing it, and found some very interesting results, this was the code I ended up [...]
Loop through an array
So you want to loop through an array? The straight forward answer would be something like this: for (var i=0, i<theArray.length; ++i){ … } Is there a better way? Well have a look at this: var len = theArray.length; for (var i=0, i<len; ++i){ … } Can’t see the difference or the point? [...]