On 17 August 2006 23:28, Adam Zey wrote:
Better to do this:
if ( ($result = do_something('hello')) !== false )
{
// do something with $result
}
else
{
// do some other stuff
}
The result of an assignment like $result = do_something('hello') is
itself the result you
Chris W. Parker wrote:
Hello,
While experimenting with some object stuff I stumbled upon something new
(although not object related).
Normally I would do this:
?php
function do_something($input)
{
if($input == 'hello')
{
return $input;
}
else
{
return false;
}
}
$result
2 matches
Mail list logo