hey guys!
I can't seem to get the syntax correct for this. I'm trying to put in different options inside a string:
$x =42
echo 'blah' if($x == 42){' blue '}'blah';
I think you get the general idea. I've tried this a few different ways, using {.' blue '.}
and using '.if($x==42){'blue'}. the latter not making any sense of course because the if statement is not a string but I figured I'd try. I realize I could just do something like this:
if($x=42) {$y=' blue '}
echo 'blah'.$y.'blah';
but I'm interested in knowing the proper way to insert the php inside the string itself. Thanks for your time!
-slight