Warning: Undefined array key 0 in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 406

Warning: Attempt to read property "parent" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 407

Warning: Attempt to read property "term_id" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 413

Warning: Attempt to read property "cat_name" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 413

変数の宣言と命名規約

PHP

PHPでは変数の頭に「$」を付けて変数を宣言します。 変数の命名規約は以下の通りです。

正しい変数宣言例

arg;
$_arg2;
$a_r_g_3;

間違った変数宣言例

rg;  //頭に$が付いていないため無効
$4arg; //先頭が数字なため無効
$arg@ //アンダーバー以外の記号を使ったため無効

Warning: Undefined variable $category in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 79

Warning: Attempt to read property "name" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 79

の記事

eyecatch

デバッグモードでサイトのエラーを確認する

eyecatch

XAMPPでローカルにPHP開発環境を設定する

eyecatch

JavaScriptの関数記述と呼び出し

eyecatch

改行・空白・タブ

eyecatch

HTMLとは

eyecatch

定義済み定数


Warning: Undefined variable $category in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 84

Warning: Attempt to read property "count" on null in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/content.php on line 84
HOME