$rangeY = range(1950, 2015);
$rangeM = range(1, 12);
$rangeD = range(1, 31);
<select class="profile_birthday_select" name="yy" id="yy">
<?foreach ($rangeY as $key) {?>
<option value="male"><?=$key;?></option>
<?}?>
</select>
<select class="profile_birthday_select" name="mm" id="mm">
<?foreach ($rangeM as $key) {?>
<option value="male"><?=$key;?></option>
<?}?>
</select>
<select class="profile_birthday_select" name="dd" id="dd">
<?foreach ($rangeD as $key) {?>
<option value="male"><?=$key;?></option>
<?}?>
</select>
我想判斷該用戶的個別年月日但是過來的數據會是這樣的格式:String且是 YYYY-MM-DD
<?=$data->{'birthday'};?>
這樣我要怎麼個別取出YYYY、MM、DD?
1 回答
- 1 回答
- 0 关注
- 386 浏览
添加回答
举报
0/150
提交
取消