可能性の重複です:
Difference between single quote and double quote string in php- '' の使用の違いと ""
こんにちはすべて
私はPHPと私に非常に新しいですが、 ''と ''の使用の違いは何かを知りたがっていますか?
おかげ
可能性の重複です:
Difference between single quote and double quote string in php- '' の使用の違いと ""
こんにちはすべて
私はPHPと私に非常に新しいですが、 ''と ''の使用の違いは何かを知りたがっていますか?
おかげ
二重引用符は文字列の内容を評価しますが、一重引用符は一致しません。
$var = 123;
echo 'This is the value of my var: $var'; // output: This is the value of my var: $var
echo "This is the value of my var: $var"; // output: This is the value of my var: 123
それはあまりにもパフォーマンスの問題でした、「原因の評価時間は、インタプリタに影響しますが、最近は現在の(最小)ハードウェアと、それはもう問題ではありません。
$name='RkReddy';
echo "$name hi hello"; //op-RkReddy hi hello
echo '$name hi hello';//op-$name hi hello
ずっと何もしていますが、文字列内のPHP変数を使用することができ、二重引用符を使用して、文字列が出力変数の値。一重引用符を使用すると、実際の値を解析せずに変数名を出力します。 IE:
$something = "A nice little variable";
echo "$something is printed out"; //output: A nice little variable is printed out
echo '$something is not printed out'; //output: $something is not printed out
希望します。
ありがとう! :) – Yoni
マニュアルの[strings chapter](http://php.net/manual/en/language.types.string.php)を参照してください –
何かとても基本的なことが分かっていれば、 *他の人の時間を無駄にしない*、してください。 –
このリンクを参照してくださいhttp://stackoverflow.com/questions/3446216/difference-between-single-quote-and-double-quote-string-in-php –