Xlquiz 0.1.1 > Functions.php

Questions? Need Help? Want to share? » PHP Forum
Script Name:
Xlquiz 0.1.1

Download:
xlquiz-0.1.1.zip

Category:
Tests And Quiz

Archive Content:

Xlquiz 0.1.1

Xlquiz 0.1.1 > Docs

Xlquiz 0.1.1 > Cache

Xlquiz 0.1.1 > Css

Xlquiz 0.1.1 > Lang

Xlquiz 0.1.1 > Db

Xlquiz 0.1.1 > Templates

Xlquiz 0.1.1 > Classes

Xlquiz 0.1.1 > Classes > Excel

Functions.php:


<?php
/**
 *    (c)2005 http://Lauri.Kasvandik.com
 */

function print_pre($var)
{
    print 
'<pre>';
    
print_r($var);
    print 
'</pre>';
}

// t as translate
function t($string,  $lang 'et') {
    static 
$strings;

    if(!isset(
$strings)) {
        if(
defined('LANG')) $lang LANG;

        
$path 'lang/' $lang '.ini';

        if(!
is_file($path)) return 'Languagefile "' $path '" not found :(';

        
$strings parse_ini_file($path);
    }
    return isset(
$strings[$string]) ? $strings[$string] : $string;
}


function 
mikrotime()
{
    return 
array_sum(explode(' ',  microtime()));
}

function 
nice_chars($str)
{
    
$find        = array('…',             '‘',             '’',             '—',             '“',             '”');
    
$replace = array('&hellip;',     '&lsquo;',     '&rsquo;',     '&mdash;',     '&ldquo;',     '&rdquo;');
    return 
str_replace($find,  $replace,  $str);
}

?>


Other Tests And Quiz Scripts:

  • Xlquiz 0.1.1
WebMaster Resources Home

©RingsWorld.com