Category: "PHP"

Simple Hit Counter Example

Hit counters are valuable because they allow site visitors to see how many people visited or used a server-based tool. This is a very simple implementation of a counter. You can see it run at the link above. The counter code is in the back-end/ser… more »

Gradient Generator Notes

Value The value of this utility is in its simplicity. Image, photo, and graphical editors are very action-intensive. This tool allows a selection of a single color, the width/height, and then it creates all four gradients. This is a very fast way t… more »

Optional Parameters - Extending Existing Functions

Both PHP and javascript allow optional parameters and variable arguments. PHP func_get_args() - allows you to get the arguments for a function. Great if you need a variable number of arguments, perhaps for something like sprintf. http://us3.php… more »

Multi-Dimensional Array Sorts for PHP

To sort a multi-dimensional array in PHP, you can use usort, like so: usort($aArray,"cmp_func"); function cmp_func($a,$b) { return strcasecmp($a['x'],$b['x']); } more »

dojox Grid Select Indicator Demo

Demonstration of a selection indicator for a dojox grid. Notes: Grey checkmark serves as select all/deselect all, if no rows are selected, clicking on the checkmark will select them all, if any rows are selected, all will be deselected. Row sele… more »