LOGO KARANDO.COM LOGO KARANDO.COM
 

FCT_STRING_BEFORE, FCT_STRING_BEFORE_LAST

Retour Librairie

function fct_string_before ($this, $inthat)
{
    return substr($inthat, 0, strpos($inthat, $this));
};
function fct_string_before_last ($this, $inthat)
{
    return substr($inthat, 0, strrevpos($inthat, $this));
};

La function fct_string_before permet de recuperer la partie avant d'une chaine apres le separateur.
Exemple:

before ('@', 'karando@karando.com');
returns 'karando'
from the first occurrence of '@'


Valid XHTML 1.0!