use IF condition for variable assignment
by Guna[ Edit ] 2012-06-02 21:15:36
Hi,
Other than checking the variable state, we can use conditional operators for assigning purpose also. Below
i've given one of the example.
Sample:
function add($v){
return ($v+$v);
}
if($str=add(5)){
echo $str;
}