Possible Duplicate:
Possible to capture PHP echo output?
Now I have:
function showwish()
{
echo 'happy new year';
}
and I want to assign $somevariable = showwish;
How to do this task without any error.
Note: Not allow edit showwish function.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Or if all your doing is returning one string:
Based on comment below by the OP that he cannot edit the showwish fn: