|
Posted by BabyBlue on 11/17/06 03:59
> I think you mean
>
> get_articles($new_cat, $new_num);
>
> And you're not passing a function, you're passing variables. You can't
> pass functions in PHP. You could pass objects, but you don't need to
> here.
Thank you very much for your reply.
here is exactly my code:
$article = get_articles(cat=4&numberposts=6);
// then I will extract data from $article
However, I want to pass 2 parametes cat and numberposts from another
function, so I must write another function:
function display_cat($new_cat=1,$new_num=1,$othercontent="")
{
$article=get_articles(cat=$new_cat&numberposts=$new_num)
......
}
My purpose is want to pass $new_cat and $new_num from function
display_cat().
Is is possible ?
Please help me, thank you very much !
[Back to original message]
|