I have a php function that I wish to reduce even further.
<?='Testing'?>
Is there a way to reduce this any further?
I have a php function that I wish to reduce even further.
<?='Testing'?>
Is there a way to reduce this any further?
write Testing
without the php tags. php will only interpret code between php tags, everything else will be outputted without any further processing.
Use a shorter word? ;)
Or put it outside the PHP tags (effectively starting and stopping the PHP goodiness).
?>Testing<?
Incidentally - I'm not overly sure what you want to achieve by "shortening". Do you want to make it faster, use less characters? From that example there - I'm not sure you're going to gain a whole lot from any of these examples.
You can assign the value you'd like printed to a short variable name before the output of the script:
<?php
$a = 'Testing';
?>
Then echo out that variable in the output:
<?=$a?>
Can't get any shorter than that.