Stocker le contenu d'un preg_match_all dans une variable
Salut, j'ai un petit soucis j'aimerais stocker tout le contenu de mon preg_match_all pour l'inserer dans ma base de données, je cherche depuis un petit moment sans réponse donc je poste ici...
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
| if(preg_match("$regex","$lireFichier") && $iBool == "1" && $GO > "0")
{
preg_match_all($regex,$lireFichier,$matches,PREG_PATTERN_ORDER);
$countMatches = count($matches[0]);
$i2 = 0;
$GO++;
while($i2<$countMatches)
{
echo $matches[0][$i2];
echo "<br />";
$sqlR = sprintf($matches[0][$i2]);
echo $sqlR;
//$sqlR = $sqlR."<br />";
$i2++;
}
} |
à la fin la variable $sqlR ne contient toujours rien..
Merci d'avance !