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
2002 EPpy Award, Best Online U.S. Newspaper

PHP General Mailing List (
To unsubscribe, visit:

Reply via email to