FOLLOW US
softpcapps Software CODE HELP BLOG

Shareware and free Open Source Windows Software Applications and free Online Tools

How to Use PHP Variables inside HTML Tags without Echo

To use php variables inside HTML tags, without using an echo command, you can use the shorthand-type <?= ?>


For example :


$PAGEURL='https://softpcapps.com';

<a href="https://www.facebook.com/sharer/sharer.php?u=<?=$PAGEURL ?>">

will output :


<a href="https://www.facebook.com/sharer/sharer.php?u=https://softpcapps.com">