That is because you need to use double quote instead.
php will not convert variables to their values when surrounded by single quotes
<?php
$someVariable = 0;
echo "SomeVariable is $someVariable";
?>
More Related Contents:
- Symfony 3, Guard & Handlers
- Using PHP data in MySQL [closed]
- PHP loop blocking the rest of the code to execute [closed]
- htmlentities() vs. htmlspecialchars()
- How to post JSON to PHP with curl
- How to install MySQLi on MacOS
- Incorrect Integer (2147483647) is inserted into MySQL?
- Finding the subsets of an array in PHP
- I need my PHP page to show my BLOB image from mysql database
- Magento – Quote/order product item attribute based on user input
- How do I implement a callback in PHP?
- Best method of including views within views in CodeIgniter
- Is a new line = \n OR \r\n?
- mysql_real_escape_string VS addslashes
- How to tell if a session is active? [duplicate]
- PHP’s json_encode does not escape all JSON control characters
- PHP regex delimiter, what’s the point?
- What is the format for e-mail headers that display a name rather than the e-mail?
- Search and replace multiple values with multiple/different values in PHP5?
- in MVC, where do you draw the line between a controller and model? [closed]
- keeping url parameters during pagination
- Generating a random hex color code with PHP
- failed to open stream: HTTP wrapper does not support writeable connections
- for loop vs while loop vs foreach loop PHP
- How to find a reason when mkdir fails from PHP?
- Get file content via PHP cURL [closed]
- Can I serve MP3 files with PHP?
- Any way to break if statement in PHP?
- mysql_connect VS mysql_pconnect [closed]
- How do I determine the extension(s) associated with a MIME type in PHP?