WordPress Support Officer Question:

Download Job Interview Questions and Answers PDF

How to initialize strings with single quotes or double quotes?

WordPress Support Officer Interview Question
WordPress Support Officer Interview Question

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 Interview Questions And Answers PDF

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?