開発メモ

開発用のメモです。

defined / constant

<?php
for ( $i = 0 ; defined ( "NAME_" . str_pad ( $i , 2 , "0" ) ) && $i < 100 ; $i ++ ) {
    $key = constant ( "NAME_" . str_pad ( $i , 2 , "0" ) );
    $col = constant ( "NAME_TYPE_" . str_pad ( $i , 2 , "0" ) );
    $des = constant ( "NAME_DESC_" . str_pad ( $i , 2 , "0" ) );
}
Twitter: @asahina_alice