« PHP 8.3 Manual トップ
著作権 »
per page, with , order by , clip by
Results of 1 - 10 of about 68 for elseif (0.002 sec.)
elseif/else if 14197
« else 制御構造に関する別の構文 » PHP Manual 制御構造 elseif/else if 検索 elseif/else if (PHP 4, PHP 5, PHP 7, PHP 8) elseif は、その名前から分かるように、 if と else の組み合わせです。 elseif は、 else のように、元の if 式の値が false の場 ... 合に別の文を実行するように if 文を拡張します。 しかし、 else とは異なり、 elseif 式が true の場合にのみ代わりの式を実行します。 例えば、次のコードは、 aはbより大きい 、 aはbと等しい 、 aはbより小さい のい ... ずれかを出力します。 <?php $a = 1 ; $b = 1 ; if ( $a > $b ) { echo "aはbより大きい" ; } elseif ( $a == $b ) { echo "aはbと等しい" ; } else { echo "aはbより小さい" ; } 上の例の出力は以下となります。 aはbと等しい 複数の ... elseif を同じ if 文の中で使用することができます。 true と評価された最初の elseif 式を実行します。PHP では、(単語二つで)'else if'と ...
https://man.mtool.work/php/8.3/control-structures.elseif.html
elseif/else if 14140
« else 制御構造に関する別の構文 » PHP Manual 制御構造 elseif/else if 検索 elseif/else if (PHP 4, PHP 5, PHP 7, PHP 8) elseif は、その名前から分かるように、 if と else の組み合わせです。 elseif は、 else のように、元の if 式の値が false の場 ... 合に別の文を実行するように if 文を拡張します。 しかし、 else とは異なり、 elseif 式が true の場合にのみ代わりの式を実行します。 例えば、次のコードは、 aはbより大きい 、 aはbと等しい 、 aはbより小さい のい ... ずれかを出力します。 <?php $a = 1 ; $b = 1 ; if ( $a > $b ) { echo "aはbより大きい" ; } elseif ( $a == $b ) { echo "aはbと等しい" ; } else { echo "aはbより小さい" ; } 上の例の出力は以下となります。 aはbと等しい 複数の ... elseif を同じ if 文の中で使用することができます。 true と評価された最初の elseif 式を実行します。PHP では、(単語二つで)'else if'と ...
https://man.mtool.work/php/8.3/control-structures.elseif.html
操作モードを返す 8793
« RegexIterator::getFlags RegexIterator::getPregFlags » PHP Manual RegexIterator 操作モードを返す 検索 RegexIterator::getMode (PHP 5 >= 5.2.0, PHP 7, PHP 8) RegexIterator::getMode — 操作モードを返す 説明 public function RegexIterator::getMo ... de = $regexIterator -> getMode (); if ( $mode & RegexIterator :: GET_MATCH ) { echo 'Getting the match for each item.' ; } elseif ( $mode & RegexIterator :: ALL_MATCHES ) { echo 'Getting all matches for each item.' ; } elseif ( $mode & RegexIterator :: ... MATCH) { echo 'Getting each item if it matches.' ; } elseif ( $mode & RegexIterator :: SPLIT ) { echo 'Getting split pieces of each.' ; } ?> 上の例の出力は以下となります。 Getting th ... exIterator::setMode() - 操作モードを設定する 関連キーワード: RegexIterator 操作 モード getMode test mode Getting echo item elseif setMode パラメータ str arrayIterator new regexIterator match matches getFlags Search ...
https://man.mtool.work/php/8.3/regexiterator.getmode.html
操作モードを返す 8793
« RegexIterator::getFlags RegexIterator::getPregFlags » PHP Manual RegexIterator 操作モードを返す 検索 RegexIterator::getMode (PHP 5 >= 5.2.0, PHP 7, PHP 8) RegexIterator::getMode — 操作モードを返す 説明 public function RegexIterator::getMo ... de = $regexIterator -> getMode (); if ( $mode & RegexIterator :: GET_MATCH ) { echo 'Getting the match for each item.' ; } elseif ( $mode & RegexIterator :: ALL_MATCHES ) { echo 'Getting all matches for each item.' ; } elseif ( $mode & RegexIterator :: ... MATCH) { echo 'Getting each item if it matches.' ; } elseif ( $mode & RegexIterator :: SPLIT ) { echo 'Getting split pieces of each.' ; } ?> 上の例の出力は以下となります。 Getting th ... . 参考 RegexIterator::setMode() - 操作モードを設定する 関連キーワード: RegexIterator 操作 モード getMode mode Getting item elseif setMode arrayIterator regexIterator match matches getFlags getPregFlags teststr ArrayIterator a-z split pieces 参考 ...
https://man.mtool.work/php/8.3/regexiterator.getmode.html
制御構造に関する別の構文 8594
« elseif/else if while » PHP Manual 制御構造 制御構造に関する別の構文 検索 制御構造に関する別の構文 (PHP 4, PHP 5, PHP 7, PHP 8) PHPは、いくつかの制御構造、つまり、 if 、 while 、 for 、 foreach 、 switch に関する別の構文を提供します。 各構 ... 書かれた if 文の内部で入れ子になっています。 この HTML ブロックは、 $a が 5 の場合にのみ表示されます。 この方法は、 else や elseif にも同様に適用することができます。 次の例は、この形式で if 文を elseif および else とともに使用しています。 <?php $a = 5 ; ... if ( $a == 5 ): echo "aは5に等しい" ; echo "..." ; elseif ( $a == 6 ): echo "aは6に等しい" ; echo "!!!" ; else: echo "aは5でも6でもない" ; endif; 上の例の出力は以下となります。 aは ... なります。 Fooは1 while 、 for 、および if に、より多くの例があります。 関連キーワード: php 構文 構造 switch 制御 echo case elseif else endswitch foo while endif ブロック Foo 括弧 コード error Search いくつ ...
https://man.mtool.work/php/8.3/control-structures.alternative-syntax.html
制御構造に関する別の構文 8594
« elseif/else if while » PHP Manual 制御構造 制御構造に関する別の構文 検索 制御構造に関する別の構文 (PHP 4, PHP 5, PHP 7, PHP 8) PHPは、いくつかの制御構造、つまり、 if 、 while 、 for 、 foreach 、 switch に関する別の構文を提供します。 各構 ... 書かれた if 文の内部で入れ子になっています。 この HTML ブロックは、 $a が 5 の場合にのみ表示されます。 この方法は、 else や elseif にも同様に適用することができます。 次の例は、この形式で if 文を elseif および else とともに使用しています。 <?php $a = 5 ; ... if ( $a == 5 ): echo "aは5に等しい" ; echo "..." ; elseif ( $a == 6 ): echo "aは6に等しい" ; echo "!!!" ; else: echo "aは5でも6でもない" ; endif; 上の例の出力は以下となります。 aは ... 力は以下となります。 Fooは1 while 、 for 、および if に、より多くの例があります。 関連キーワード: 構文 構造 switch 制御 case elseif else endswitch while endif ブロック 括弧 コード foreach 提供 コロン endwhile endfor endforeach 基本的 内部 入れ子 方法 適用 ...
https://man.mtool.work/php/8.3/control-structures.alternative-syntax.html
else 8268
« if elseif/else if » PHP Manual 制御構造 else 検索 else (PHP 4, PHP 5, PHP 7, PHP 8) ある条件が満たされている場合にある文を実行し、 その条件が満たされていない場合に別の文を実行したいと考えた ことが度々あるかと思います。 このために else があ ... } 上の例の出力は以下となります。 aはbよりも大きくない else 文は、 if 式が false と評価された場合のみ実行されます。 また、 elseif 式がある場合には、それも false と評価された場合にのみ実行されます。 ( elseif 参照) 注意 : else がぶら下がる場合 if - else ... いが正しいことに依存している場合、 曖昧さを解決するために波括弧を使うことを推奨します。 関連キーワード: else 場合 false echo elseif 条件 php 評価 関連 インデント Search 制御 構造 拡張 コード ネスト true 結果 影響 振る舞い ...
https://man.mtool.work/php/8.3/control-structures.else.html
else 8268
« if elseif/else if » PHP Manual 制御構造 else 検索 else (PHP 4, PHP 5, PHP 7, PHP 8) ある条件が満たされている場合にある文を実行し、 その条件が満たされていない場合に別の文を実行したいと考えた ことが度々あるかと思います。 このために else があ ... } 上の例の出力は以下となります。 aはbよりも大きくない else 文は、 if 式が false と評価された場合のみ実行されます。 また、 elseif 式がある場合には、それも false と評価された場合にのみ実行されます。 ( elseif 参照) 注意 : else がぶら下がる場合 if - else ... ん。 この振る舞いが正しいことに依存している場合、 曖昧さを解決するために波括弧を使うことを推奨します。 関連キーワード: else elseif 条件 評価 関連 インデント 制御 構造 拡張 コード ネスト 影響 依存 解決 括弧 推奨 ...
https://man.mtool.work/php/8.3/control-structures.else.html
画像をブラウザあるいはファイルに出力する 8141
« imagegetinterpolation imagegrabscreen » PHP Manual GD および Image 関数 画像をブラウザあるいはファイルに出力する 検索 imagegif (PHP 4, PHP 5, PHP 7, PHP 8) imagegif — 画像をブラウザあるいはファイルに出力する 説明 function imagegif ( GdIma ... / Handle output if( function_exists ( 'imagegif' )) { // For GIF header ( 'Content-Type: image/gif' ); imagegif ( $im ); } elseif( function_exists ( 'imagejpeg' )) { // For JPEG header ( 'Content-Type: image/jpeg' ); imagejpeg ( $im , NULL , 100 ); } e ... lseif( function_exists ( 'imagepng' )) { // For PNG header ( 'Content-Type: image/png' ); imagepng ( $im ); } elseif( function_exists ( 'imagewbmp' )) { // For WBMP header ( 'Content-Type: image/vnd.wap.wbmp' ); imagewbmp ( $im ); } else { ... を使用することが可能です。 <?php if( imagetypes () & IMG_GIF ) { header ( 'Content-type: image/gif' ); imagegif ( $im ); } elseif( imagetypes () & IMG_JPG ) { /* ... etc. */ } ?> 参考 imagepng() - PNG イメージをブラウザまたはファイルに出力する imagewbm ...
https://man.mtool.work/php/8.3/function.imagegif.html
画像をブラウザあるいはファイルに出力する 8141
« imagegetinterpolation imagegrabscreen » PHP Manual GD および Image 関数 画像をブラウザあるいはファイルに出力する 検索 imagegif (PHP 4, PHP 5, PHP 7, PHP 8) imagegif — 画像をブラウザあるいはファイルに出力する 説明 function imagegif ( GdIma ... / Handle output if( function_exists ( 'imagegif' )) { // For GIF header ( 'Content-Type: image/gif' ); imagegif ( $im ); } elseif( function_exists ( 'imagejpeg' )) { // For JPEG header ( 'Content-Type: image/jpeg' ); imagejpeg ( $im , NULL , 100 ); } e ... lseif( function_exists ( 'imagepng' )) { // For PNG header ( 'Content-Type: image/png' ); imagepng ( $im ); } elseif( function_exists ( 'imagewbmp' )) { // For WBMP header ( 'Content-Type: image/vnd.wap.wbmp' ); imagewbmp ( $im ); } else { ... を使用することが可能です。 <?php if( imagetypes () & IMG_GIF ) { header ( 'Content-type: image/gif' ); imagegif ( $im ); } elseif( imagetypes () & IMG_JPG ) { /* ... etc. */ } ?> 参考 imagepng() - PNG イメージをブラウザまたはファイルに出力する imagewbm ...
https://man.mtool.work/php/8.3/function.imagegif.html
PREV 1 2 3 4 5 6 7 NEXT