Skip to content

Instantly share code, notes, and snippets.

View mbmjertan's full-sized avatar
🥊

Mario Borna Mjertan mbmjertan

🥊
View GitHub Profile
@brankoajzele
brankoajzele / fiskalizacija.php
Last active December 1, 2022 17:26
Kompletan primjer fiskalizacije (Croatian fiscalization act/law).
<?php
/**
* @author Branko Ajzele <ajzele@gmail.com, http://foggyline.net>
*/
$XMLRequestType = 'RacunZahtjev'; /* RacunZahtjev OR PoslovniProstorZahtjev */
@zachstronaut
zachstronaut / gist:1184831
Created August 31, 2011 21:53
Get a relative time string in PHP without a lot of if/else or switch/case
<?php
/**
* time_elapsed_string()
*
* Zachary Johnson
* http://www.zachstronaut.com/posts/2009/01/20/php-relative-date-time-string.html
*/
function time_elapsed_string($ptime) {
$etime = time() - $ptime;