[theme-reviewers] usage of single quotes and double quotes in PHP

Austin Matzko austin at pressedcode.com
Thu Mar 3 14:20:20 UTC 2011


On Thu, Mar 3, 2011 at 8:13 AM, Satish Gandham <satish.iitg at gmail.com> wrote:
> Which is better of the following two
>
> <?php
> echo "This is a string with variable $test_variable"
> ?>
>
> <?php
> echo 'This is another variant of the above statement '.$test_variable
> ?>

Better:

printf( __( 'This is another variant of the above statement %s',
'theme-slug' ), $test_variable );


More information about the theme-reviewers mailing list