View Single Post
Old 04-18-2008, 01:45 AM   #1 (permalink)
Dave
The Acquainted
 
Dave's Avatar
 
Join Date: Apr 2008
Posts: 110
Thanks: 97
Dave is on a distinguished road
Confused Question about 'return' statement in UDF...

I'm having trouble understanding a concept...(nothing new about that...) Here it is:

Here is UDF#1:

function udf_1($number) {
$newnumber = ($number + 100);
return $newnumber ;
}

Here is UDF#2:

function udf_2($number) {
return $number + 100 ;
}

My question is, why would it ever be beneficial to use udf_1() over the more simple udf_2()?

Thanks!
Dave
Dave is offline  
Reply With Quote