paulg wrote:I've just loaded apache2 and php5 onto my windows test server and all lines in html using the shortcut ' <?=$name?> ' now display nothing.
Is this a feature no longer supported in php5, or is it a setting in php.ini?
Cheers all,
Paul.
Do yourself a favour and do it the proper way:
<?php echo($name) ?>
PHP is embedded in HTML using processing instructions. A processing instruction is identified using a name i.e: xml,php. <?= is not a valid processing instruction. If you are using XML; it would make the XML document invalid. If they introduced something like this it would be a lot better:
<?php =$name ?>
Unfortunatly it hasn't been deprecated in PHP yet, not even in the PHP 6 development snapshots :mad:
In any case short tags are not turned on by default and to ensure your scripts do not break on host which have it disabled it should be avoided.