×

Sign in with twitter.

You can follow the user and hashtags.

Share your tips on social media.

Post relative tips.

If you have relative tips, click [Add relative tips] to post.

SELECTタグなどで使う時刻選択を30分単位の配列で生成してくれるPHPコードスニペット(PHP5.3以降)

@Ogaaaan@Ogaaaan 2868 viewer 55 embed viewer embed
$hours = array_map(function($h) {
return ($h===round($h))?sprintf('%02d:00', ($h)):sprintf('%02d:30', ($h));
}, range(0, 23, 0.5));

#php

Click this to change format.

Add relative tips

Users who share this tip.

Comments