Return array of categories to php function

this should do it:

$categories = get_categories();
foreach( $categories as $category ) { 
    echo '<input type="checkbox" name=" . $category->slug . "" value="' . $category->term_id . '" /> ' . $category->name . '<br />' . "\n";
}

and you can change/order the list by feeding arguments to get_categories():
http://codex.wordpress.org/Function_Reference/get_categories

Leave a Comment