Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
bruh

asakapab0i

💭
bruh
View GitHub Profile
View datesolution
<?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">
@asakapab0i
asakapab0i / readdir.php
Created Apr 22, 2014
read diles in directory
View readdir.php
<?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;
You can’t perform that action at this time.