View Single Post
Old 01-20-2008, 02:58 AM   #1 (permalink)
sarmenhb
The Addict
 
sarmenhb's Avatar
 
Join Date: Jan 2008
Location: los angeles
Posts: 309
Thanks: 44
sarmenhb is on a distinguished road
Default whats a good way to write this function

what im trying to do is, if i were to type the function as br(); without any arguments i want the output to display my own message instead of php's error being

Warning: Missing argument 1 for br()


<?php

function br($num)
{
$num = 0;
if ($num == null) { die('br function must contain a value');
return;
}

else { echo "<br>"; }
return;
}


br();
?>
__________________
no signature set
sarmenhb is offline  
Reply With Quote