Hey everyone. I'm having a really tough time figuring this one out from the php manual, so I thought I'd as here for help.
I have the following:
function ldu_build_catpath($cat, $mask)
{
global $ldu_cat, $cfg;
$pathcodes = explode('.', $ldu_cat[$cat]['path']);
foreach($pathcodes as $k => $x)
{ $tmp[]= sprintf("<a href=\"list.php?c=%1\$s\">%2\$s</a>, $x, $ldu_cat[$x]['title']"); }
$result = implode(' '.$cfg['separator'].' ', $tmp);
return ($result);
}
and I would like to include a function in the sprintf line so it would look like this:
sprintf("<a href=\"list.php?c=".cleanup("%1\$s")."\">%2\$s</a>, $x, $ldu_cat[$x]['title']");
However this doesn't work since the %2\$s doesn't get parsed. Does any one know of a workaround for this?
Thanks so much!