0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

PHP 変数に値を格納する

Posted at

目的

  • PHPで変数に値を格納する方法をまとめる

書き方の例

  • 下記に変数への文字列の格納方法を記載する。
<?php
$変数名 = 格納する値;
?>

具体的な書き方の例

  • 下記に変数nameに「miriwo」を格納し出力する処理を記載する。
<?php
$name = "miriwo";
echo $name;
?>
  • 下記に変数numberに数値の「3」を格納し出力する処理を記載する。
<?php
$number = 3;
echo $number;
?>
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

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?