php - Can I echo a variable with single quotes? -



php - Can I echo a variable with single quotes? -

can echo in single quotes variable?

example

echo 'i love $variable.';

i need because have lots of html echo too.

you must either use:

echo 'i love ' . $variable . '.';

this method appends variable string.

or use:

echo "i love $variable.";

notice double quotes used here!

php echo

Comments

Popular posts from this blog

iphone - Dismissing a UIAlertView -

intellij idea - Update external libraries with intelij and java -

javascript - send data from a new window to previous window in php -