Default Parameters in PHP

fs5

Lifer
Jun 10, 2000
11,774
1
0
function list_cats($optionall = 1, $all = 'All', $sort_column = 'ID', $sort_order = 'asc', $file = '', $list = true, $optiondates = 0, $optioncount = 0, $hide_empty = 1, $use_desc_for_title = 1, $children=FALSE, $child_of=0, $categories=0, $recurse=0, $feed = '', $feed_image = '', $exclude = '', $hierarchical=FALSE) {}

one of functions in php. What if you want to call list_cat with $exclude defined and all the other parameters before it as the predefined ones?

:( n/m the only way is the way I thought... the hard way. (specify each string as the default and each bool/int as '')