Using String interpolation in php

Limited Time Offer!

For Less Than the Cost of a Starbucks Coffee, Access All DevOpsSchool Videos on YouTube Unlimitedly.
Master DevOps, SRE, DevSecOps Skills!

Enroll Now

String interpolation is quick shortcut, allowing to pop up the value of a variable into double quoted String. Remember that any variable with “$” sign into single quote is not a variable, it just treat as a statement.

eg. ‘$num is not a variable’ because num variable is written into single quote.

<?php
    $value= 10;
    echo "$value is good price of the product"; //String interpolation
    echo '$value is good price of the product';
?>