Tools, FAQ, Tutorials:
Ways to Include Variables in Double-Quoted Strings in PHP
How Many Ways to Include Variables in Double-Quoted Strings?
✍: FYIcenter.com
There are 3 formats to include variables in double-quoted strings:
Here is a PHP script example of different ways to include variables in double-quoted strings:
<?php
$beer = 'Heineken';
echo "$beer's taste is great.\n";
echo "He drank some ${beer}s and water.\n";
echo "She drank some {$beer}s and water.\n";
?>
This script will print:
Heineken's taste is great. He drank some Heinekens and water. She drank some Heinekens and water.
⇒ Including Array Elements in Double-Quoted Strings in PHP
⇐ Including Variables in Double-Quoted Strings in PHP
2016-10-13, ∼2882🔥, 0💬
Popular Posts:
How to use the "rewrite-uri" Policy Statement for an Azure API service operation? The "rewrite-uri" ...
How to use the XML to JSON Conversion Tool at freeformatter.com? If you want to try the XML to JSON ...
How to access Query String parameters from "context.Request.Url.Que ry"object in Azure API Policy? Q...
How to pull NVIDIA CUDA Docker Image with the "docker image pull nvidia/cuda" command? If you are ru...
What are the differences of Differences of evaluateTransaction() and submitTransaction() of the fabr...