hello all,
i am new in php development,and i do not know hohw to make any function an any one told me how i will do this?
thanks in advance
how to create a new function
Moderator: General Moderators
-
uday.strad
- Forum Newbie
- Posts: 10
- Joined: Wed Oct 02, 2013 1:03 am
Re: how to create a new function
LOL...
What sort of question is this .... you will always find this answer....although your new next time make sure you google these doubts....
Heres your answer....
<?php
function writeMsg()
{
echo "Hello world!";
}
writeMsg(); // call the function
?>
What sort of question is this .... you will always find this answer....although your new next time make sure you google these doubts....
Heres your answer....
<?php
function writeMsg()
{
echo "Hello world!";
}
writeMsg(); // call the function
?>
Re: how to create a new function
Hi,
You should try this code to call any function
<?php
function foo($arg_1, $arg_2, /* ..., */ $arg_n)
{
echo "Example function.\n";
return $retval;
}
?>
Thanks I hope it will help you.
You should try this code to call any function
<?php
function foo($arg_1, $arg_2, /* ..., */ $arg_n)
{
echo "Example function.\n";
return $retval;
}
?>
Thanks I hope it will help you.