this is a very simple question.  I'm trying to figure out if there is a
one line way to do this:

I want to pass a variable to the function only if it matches a certin
value, I know I can do this:

if($a=='H') my_function($bob,'Y');
else my_function($bob);

but If it's possible I'd like to do it with one line something that I'd
think it would be like this.

my_function($bob,if($a=='H') return 'Y'; );

I know that return doesn't work, and echo wouldn't work either,  can you
even put a if statement inside a function call?

-- 
Jeff Bearer, RHCE
Webmaster
PittsburghLIVE.com
2002 EPpy Award, Best Online U.S. Newspaper


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to