echo "{$test}y";
You can use braces to remove ambiguity when interpolating variables directly in strings.
Also, this doesn’t work with single quotes. So:
echo '{$test}y';
will output
{$test}y
More Related Contents:
- How i can earn variable from string in PHP? [closed]
- How to include a PHP variable inside a MySQL statement
- How can I combine two strings together in PHP?
- PHP – concatenate or directly insert variables in string
- How create an array from the output of an array printed with print_r?
- Dollar ($) sign in password string treated as variable
- How to get int instead string from form?
- PHP variable interpolation vs concatenation [duplicate]
- Convert a String to Variable
- How to store variable value after clicking “Submit”?
- Send JavaScript variable to PHP variable [duplicate]
- PHP: Split string [duplicate]
- Remove portion of a string after a certain character
- How do I linkify urls in a string with php?
- How to split a string by multiple delimiters in PHP?
- Check whether $_POST-value is empty
- How to get email address from a long string
- use strings to access (potentially large) multidimensional arrays
- Structure of a Serialized PHP string
- How to cast array elements to strings in PHP?
- How to reverse a Unicode string
- PHP pass variable to include
- remove duplicate from string in PHP
- How to Convert Boolean to String
- Regex & PHP – isolate src attribute from img tag
- Delete first 3 characters and last 3 characters from String PHP
- How can I get the last 7 characters of a PHP string?
- How to convert all characters to their html entity equivalent using PHP
- Remove first 4 characters of a string with PHP
- PHP extract link from tag [duplicate]