from the Artful MySQL Tips List

This function uses a callback function.
function doIt($callback) {
  $data = acquireData();
This is a sample callback function for doIt().
function myCallback($data) {
  echo 'Data is: ', $data, "\n";
Call doIt() and pass our sample callback function's name.

Last updated 22 May 2009

Return to the Artful MySQL Tips page