0
0

More than 3 years have passed since last update.

PHP変数の埋め込みかた

Posted at

PHP変数の埋め込み方

PHPの文字列に変数を埋め込みたい時はダブルクォーテーションを使います。

<?php
    $a = 1;

    echo "{$a}回目です。";
  ?>

文字列をシングルクォーテーションで囲むとエラーになりますのでご注意ください。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0