WordPress Support Officer Question: Download WordPress Support Officer PDF

How to initialize strings with single quotes or double quotes?

Tweet Share WhatsApp

Answer:

Since the data inside the single-quoted string is not parsed for variable substitution, it's always a better idea speed-wise to initialize a string with single quotes, unless you specifically need variable substitution.

Download WordPress Support Officer PDF Read All 31 WordPress Support Officer Questions
Previous QuestionNext Question
Please explain the difference between characters 23 and x23?<?php
$str = 'Hello, there.nHow are you?nThanks for visiting Us';
print $str;
?>
Why does not given code print the newline properly?