Skip to content

Instantly share code, notes, and snippets.

@sineld sineld/SINAN.php
Created Feb 23, 2012

Embed
What would you like to do?
Sinan helper class
<?php defined('SYSPATH') or die('No direct script access.');
/**
* Sinan helper class.
*
* $Id: sinan.php 1.0 2012-02-22 20:06:38Z Geert $
*
* @package Sinan
* @author Sinan Eldem
* @copyright (c) 2012 Sinan Eldem
* @license http://kohanaphp.com/license.html
*/
class SINAN{
/**
* Cleans special chars from phone number.
*
* @param string phone number
* @return string
*/
public static function tel($tel)
{
return str_replace(array('(', ')', ' ', '-'), array(''), $tel);
}
public static function tarih($tarih)
{
$tar = explode('-', $tarih);
return $tar[2].'-'.$tar[1].'-'.$tar[0];
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.