Thursday, June 19, 2008

PHP - created a nested HTML unordered list from an array

PHP function Get_Array_Keys_UL will create an nested HTML Unordered List string of the keys of a given array. Makes best sense with literal keys, e.g. $_POST:


/**
* Creates recursively a nested HTML UL of array keys.
* @param array $array Array
* @return string Nested UL string
*/
function Get_Array_Keys_UL($array=array()) {
$recursion=__FUNCTION__;
if (empty($array)) return '';
$out='
    '."\n";
    foreach ($array as $key => $elem)
    $out .= '
  • '.$key.$recursion($elem).'
  • '."\n";
    $out .= '
'."\n";
return $out;
}




Found here

Wednesday, June 18, 2008

Firefox download day

Today is Firefox download day

Monday, June 09, 2008

Steve Jobs keynote

Here's one to bookmark - Popular Mechanics will have Cult of Mac live blogging the Jobs keynote today - due to start at 12 noon NYC (Eastern) time:

Steve Job live blog

Tuesday, June 03, 2008

Random links

Goosh - command line Google
Surfraw - command line interface to the web
Installing OpenAds
NASA makes magnetic fields
visible
(vid)
Install XP via Virtualbox
The Chandler Project - a new way of organising tasks & notes
How to turn on bash smart completion
Read at Work - classic novels in Powerpoint format
Scaring people with Flash's fullscreen