Conditional statment in the middle of output?
Posted: Fri Apr 04, 2003 11:50 am
Is it somehow possible to have an if statement in the middle of an echo. Like:
I tried code similar to that without any luck. I wondered if there was a way to get around it or make it work. Cause there is a certain part in the code where I want to output something if an if statement is true and nothing if its false. Thanks.
Code: Select all
echo "bill likes" . if ($likes =="yes") echo "me" . "!!!!!!"