I've got a question how can you call a function that has parameter?
for example
function name_function($param)
{
// codes
return $param;
}
how can I call that so that it will prints that param out to the page?
Printable View
I've got a question how can you call a function that has parameter?
for example
function name_function($param)
{
// codes
return $param;
}
how can I call that so that it will prints that param out to the page?
name_function('Hello');
but it doesn't print out to the page. Unless I changed the return to echo
Wait maybe this function is not a good example. I meant I want to replace that "hello" with "Hi", then I wanna return that Hi not Hello. You dont have to tell me about str_repalce, I just want to know how to call the "return" statement and print the returned value to the page without using echo.
Well, echo name_function('Hello') then.
Isn't this... basic?
Haha.. oh man.. that's it! sometimes, my mind isn't quite working lol