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

[html]<!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>

[/html]

0 0 votes
Article Rating
Subscribe
Notify of
guest

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

17 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
SEO SPecialist

<?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

I actually enjoyed reading through this posting.Many thanks.

Function Point Estimation Training

Jesica Paul

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

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

Valuable information thanks for sharing Loadrunner Online Training

Devi.Angularjs

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

I learned new concept. Thanks for sharing.

seo training center in chennai

UMA MAHESWARI

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

Ajay Kumar

Nice information thanks for posting PHP Training in chennai

Yashvi

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

nanya

Wonderful post..Keep updating..

Bala

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

Shreyaz

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

kishore

great source of information

digital marketing

good information ,and thanks for sharing

stevemarkayden

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