par
Ultiny » 01 janv. 2006, 16:35
Ah finalement maintenant j'ai un autre problème.
Il me mets bien le resultat en array mais il le fait qu'une seule fois, hors moi on va rencontrer plusieurs fois les balises qui contiendrons un texte et des propriétées différentes.
Voici en faite ce que je souhaiterais rentrer par exemple dans la fonction (il n'y aura pas que ces 2 balises, mais sans doute encors beaucoup d'élements du site) :
Code : Tout sélectionner
<balise name="header">Utilisez PHP</balise><balise name="footer">Utilisez MySQL</balise>
Voici ce que j'aimerais qu'il en sorte:
Code : Tout sélectionner
array(2) {
[0]=>
array(6) {
[0]=>
string(43) "<balise name="header">Utilisez PHP</balise>"
[1]=>
string(1) " "
[2]=>
string(1) """
[3]=>
string(6) "header"
[4]=>
string(1) """
[5]=>
string(12) "Utilisez PHP"
}
[1]=>
array(6) {
[0]=>
string(45) "<balise name="footer">Utilisez MySQL</balise>"
[1]=>
string(1) " "
[2]=>
string(1) """
[3]=>
string(6) "footer"
[4]=>
string(1) """
[5]=>
string(14) "Utilisez MySQL"
}
}
Merci pour votre aide.
Edit:
J'ajoute ceci (simulation de la fonction) pour aider ceux qui veulent m'aider
$this->tempOne = array( "<balise name=\"header\">Utilisez PHP</balise>", " ", "\"", "header", "\"", "Utilisez PHP" );
$this->tempTwo = array( "<balise name=\"footer\">Utilisez MySQL</balise>", " ", "\"", "footer", "\"", "Utilisez MySQL" );
$this->parsed = array( $this->tempOne, $this->tempTwo );
Ah finalement maintenant j'ai un autre problème.
Il me mets bien le resultat en array mais il le fait qu'une seule fois, hors moi on va rencontrer plusieurs fois les balises qui contiendrons un texte et des propriétées différentes.
Voici en faite ce que je souhaiterais rentrer par exemple dans la fonction (il n'y aura pas que ces 2 balises, mais sans doute encors beaucoup d'élements du site) :
[code]<balise name="header">Utilisez PHP</balise><balise name="footer">Utilisez MySQL</balise>[/code]
Voici ce que j'aimerais qu'il en sorte:
[code]array(2) {
[0]=>
array(6) {
[0]=>
string(43) "<balise name="header">Utilisez PHP</balise>"
[1]=>
string(1) " "
[2]=>
string(1) """
[3]=>
string(6) "header"
[4]=>
string(1) """
[5]=>
string(12) "Utilisez PHP"
}
[1]=>
array(6) {
[0]=>
string(45) "<balise name="footer">Utilisez MySQL</balise>"
[1]=>
string(1) " "
[2]=>
string(1) """
[3]=>
string(6) "footer"
[4]=>
string(1) """
[5]=>
string(14) "Utilisez MySQL"
}
}[/code]
Merci pour votre aide.
Edit:
J'ajoute ceci (simulation de la fonction) pour aider ceux qui veulent m'aider :)
[php]$this->tempOne = array( "<balise name=\"header\">Utilisez PHP</balise>", " ", "\"", "header", "\"", "Utilisez PHP" );
$this->tempTwo = array( "<balise name=\"footer\">Utilisez MySQL</balise>", " ", "\"", "footer", "\"", "Utilisez MySQL" );
$this->parsed = array( $this->tempOne, $this->tempTwo );[/php]