0byt3m1n1-V2
Path:
/
home
/
nlpacade
/
www
/
fonctions
/
substitutions
/
[
Home
]
File: substitvariable.php
<?php include_once("classes/Variable.class.php"); /* Substitutions de type variable */ function substitvariable($texte){ preg_match_all("`\#VARIABLE\(([^\)]+)\)`", $texte, $cut); $tab1 = ""; $tab2 = ""; for($i=0; $i<count($cut[1]); $i++){ $variable = new Variable(); $variable->charger($cut[1][$i]); $tab1[$i] = "#VARIABLE(" . $cut[1][$i] . ")"; $tab2[$i] = $variable->valeur; } $texte = str_replace($tab1, $tab2, $texte); return $texte; } ?>
©
2018.