Use value from function in other function as string

I have 9 categories with different names. The code is as follows:

[code]if (count_categories () > 0) {
//some html code here
}

while ( has_categories() ) {
// some html code here

echo category_id() ; // prints out the respective category id
echo category_name() ; // prints out the respective categoryname

more_details (“category_name=categoryname”) ;
// this function only accepts in string format> “”
// I need some kinda way to fill this >categoryname< dynamically.
[/code]

Don’t really understand the question, taking a wild guess, i came up with this:

[php]$cat_id = category_id();
$cat_name = category_name();

more_details("$cat_id = $cat_name");[/php]

Hope that helps.
:wink:

Sponsor our Newsletter | Privacy Policy | Terms of Service