inline-html

Is there any way to return HTML in a PHP function? (without building the return value as a string)

I have a PHP function that I'm using to output a standard block of HTML. It currently looks like this: <?php function TestBlockHTML ($replStr) { ?> <html> <body><h1> <?php echo ($replStr) ?> </h1> </html> <?php } ?> I want to return (rather than echo) the HTML inside the function. Is there any way to do this without build...

Short hand if statment

Is there a shorter version of the following: Using ASP.NET MVC, this is in the HTML page <%= IsTrue ? Html.Image("~/images/myimage.gif") : "" %> I know I'm only really writing 3 extra characters, just wondering if there is something better. ...