Skip to content

Instantly share code, notes, and snippets.

View asakapab0i's full-sized avatar
💭
bruh

bryan asakapab0i

💭
bruh
View GitHub Profile
@asakapab0i
asakapab0i / readdir.php
Created April 22, 2014 09:38
read diles in directory
<?php
if ($handle = opendir('directory')) {
/* This is the correct way to loop over the directory. */
while (false !== ($entry = readdir($handle))) {
if($entry == '..' || $entry == '.'){
continue;
}
$lists[] = $entry;
<?php
//get date from db
$date = time();
?>
<div class="controls">
<?php echo form_error('event-start') ?>
<input value="<?php echo date('Y-m-d', strtotime($date)); ?>" required id="event-start" name="event-start" type="date" placeholder="" class="input-medium">
<input value="<?php echo date('H:i:s', strtotime($date); ?>" required id="event-start-time" name="event-start-time" type="time" placeholder="" class="input-medium">