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で変数を用いる方法を解説

1

(1の説明)$sumに計算したいものを入れます(PHPでは変数にドル記号を用いる)

2合計金額は:円です

(2の説明)合計金額は1の時に$に入れた計算式をprint($sum)で呼び出す

3税込価格は:円です

(3の説明)税込金額ではprint($sumに1.10をかけるアスタリスク*を用いる)

上記の結果はブラウザで以下のようになる

合計金額は:1350円です
税込価格は:1485円です

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?