Like Us Like Us Facebook Subscribe Subscribe us YouTube Whatsapp Share us Whatsapp Query Send your queries

Lets enjoy power of PHP Function

Lets enjoy power of PHP Function

function():

A set of specific program and source code which complete a specific task is function.
Function separates the complexity of a large program and provides a
modular approach. There are two type of function user define function
and library function. Now focus on user defines function and try to
understand.

PHP Function

 

Syntex of PHP function :

function functionName()
{
code to be executed;
}

 

Complete Example of PHP Function

<!DOCTYPE html>
<html lang="en">
<head>
<title>IP Address</title>
<meta charset="utf-8" />
</head>
<body>
<?php
function crdt(){
$dt=date("m/D/Y");
return $dt;
}
echo crdt();
?>
</body>
</html>

17
Leave a Reply

avatar
17 Comment threads
0 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
7 Comment authors
stevemarkaydendigital marketingkishoreShreyazBala Recent comment authors

This site uses Akismet to reduce spam. Learn how your comment data is processed.

  Subscribe  
newest oldest most voted
Notify of
SEO SPecialist
Guest

<?php
function reverse($num) //parameter receive
{
for($mod=0,$rev=0;$num>0;$num=(int)($num/10))
{
$mod=$num%10;
$rev=$rev*10+$mod;
}
echo "Out put in function"."<br>";
echo "Reverse=".$rev;
//function no return .
}
$number=365;
reverse($number); //argument passing
?>

ayshwariya
Guest

I actually enjoyed reading through this posting.Many thanks.

Function Point Estimation Training

Jesica Paul
Guest

Thanks for your informative article on software testing. Your post helped me to understand the future and career prospects in software testing. Keep on updating your blog with such awesome article. Software testing training

robin singh
Guest

Nice information about the load testing!!! I prefer Loadrunner automation testing tool to validate the performance of software application/system under actual load. Loadrunner training institute in Chennai | Loadrunner course in Chennai

Praveen Kumar
Guest

Valuable information thanks for sharing Loadrunner Online Training

Devi.Angularjs
Guest

I have read your blog its very attractive and impressive. I like it your blog.

PHP Training in chennai | PHP Training Course

PHP Training in chennai | Online PHP Course

Arjun Rishi
Guest

I learned new concept. Thanks for sharing.

seo training center in chennai

UMA MAHESWARI
Guest

Thanks for your informative article on software testing.
best oracle training institute

Ajay Kumar
Guest

Nice information thanks for posting PHP Training in chennai

Yashvi
Guest

There is no doubt in your post. I am really enjoying your services. It give so much beneficial information to every PHP developers.

nanya
Guest

Wonderful post..Keep updating..

Bala
Guest

very nice direction for writing blog content. I am new to blog writing, so this information had helped me a lot.

Shreyaz
Guest

Thanks for sharing PHP function code. Its very useful for beginners in PHP.

kishore
Guest

great source of information

digital marketing
Guest

good information ,and thanks for sharing

stevemarkayden
Guest

I have read your blog it is very wonderful and impressive. I like your blog. It gives so much ideas information to every developer.

Do you have any Query / Suggestion