This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?PHP | |
/** | |
* Spintax - A helper class to process Spintax strings. | |
* @name Spintax | |
* @author Jason Davis | |
* | |
*/ | |
class Spintax | |
{ | |
public function process($text) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Basic Template | |
*/ | |
var person = { | |
firstName: "Ivan", | |
lastName: "Milincic", | |
blogURL: "http://kreativan.net" | |
}; | |
var template = "<h1>{{firstName}} {{lastName}}</h1>Website: {{blogURL}}"; | |
var html = Mustache.to_html(template, person); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* draws a calendar */ | |
function renderCalendar($timestamp){ | |
$month = date("m", $timestamp); | |
$year = date("Y", $timestamp); | |
/* draw table */ | |
$calendar = '<table cellpadding="0" cellspacing="0" class="calendar">'; |
NewerOlder