Code: Select all
function get_loaded($type)
{
$how_many = count($type);
die($how_many);
}Several valid examples for $type are already set before this function is set. So for instance, if I call get_loaded("widgets"), I want to count the array values in $widget, already set:
Code: Select all
$widget["floaty"] = "magnificent floaty";
$widget["smackbox"] = "this sure is content.";
$widget["dracula"] = "hanging from the ceiling";