|
-
May 18th, 2007, 12:53 PM
#1
Thread Starter
Frenzied Member
[RESOLVED] calling function
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?
-
May 18th, 2007, 03:03 PM
#2
-
May 18th, 2007, 03:29 PM
#3
Thread Starter
Frenzied Member
Re: calling function
but it doesn't print out to the page. Unless I changed the return to echo
-
May 18th, 2007, 03:31 PM
#4
Thread Starter
Frenzied Member
Re: calling function
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.
-
May 18th, 2007, 03:32 PM
#5
Re: calling function
Well, echo name_function('Hello') then.
Isn't this... basic?
-
May 18th, 2007, 03:33 PM
#6
Thread Starter
Frenzied Member
Re: calling function
Haha.. oh man.. that's it! sometimes, my mind isn't quite working lol
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|