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, ∼2411🔥, 0💬
Popular Posts:
How to use the "forward-request" Policy Statement to call the backend service for an Azure API servi...
How to Install Docker Desktop 2.5.0 on Windows 10? You can follow this tutorial to Install Docker De...
How to access Request body from "context.Request.Body" object in Azure API Policy? Request body is t...
Why I am getting "The Windows SDK version 8.1 was not found" error, when building my C++ application...
What is Azure API Management Publisher Dashboard? Azure API Management Publisher Dashboard is an Azu...