Skip to content

Instantly share code, notes, and snippets.

View globalideias's full-sized avatar

Marcos Paulo F Guedes globalideias

View GitHub Profile
@globalideias
globalideias / php
Created April 22, 2017 13:46
unidades_x_minutos
<?php
const MINUTOS_UNIDADE = 20;
$total_unidades = 23;
$tempo_total = $total_unidades * MINUTOS_UNIDADE;
$horas = (int)($tempo_total / 60);
$minutos = $tempo_total % 60;
<?php
/*$labels = [
"Mon",
"Tue",
"Wed",
"Thu",
"Fri",
"Sat",
"Sun"];*/
<?php
$start = '2016-06-08 12:01:00';
$end = '2016-06-08 13:15:00';
$minutos = round(abs((strtotime($end) - strtotime($start))/60));
echo $minutos;
<?php
$a = "aa";
$b = "bb";
$c = "cc";
$d = "dd";
$e = "ee";
$get = 'a';
<?php
$qtd_numeros = 6;
$min = 1;
$max = 6;
$numeros = array();
for($i = 0; $i < $qtd_numeros; $i++){