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
if文
Warning: Undefined variable $pre in /home/yatsuba/yatsuba.com/public_html/wp-content/themes/amaru/functions.php on line 517
if文
特定の条件の場合に処理を行う時にif文を使います。
if文の書式
f(条件){
処理;
}
if~else文
特定の条件とそれ以外の場合に処理を行う時にif~else文文を使います。
if~else文の書式
f(条件)}
処理;
}else{
処理
}
if~elseif文
特定の条件ごとに処理を行う時にelseif文を使います。
if~elseif文の書式
f(条件1){
処理;
}elseif(条件2){
処理;
}
判定文の組み合わせとネスト
判定文は組み合わせたりネストさせることが可能です。
f(条件1){
if(条件1){
処理;
}elseif(条件2){
処理;
}else{
処理;
}
}



