suppression d'une ligne au sein d'au array
bonjour
j'ai un array du type
Citation:
Array ( [0] => ici j'ai mon texte
je l'est obtenu en faisant
Code:
1 2 3 4 5 6 7 8
|
$fp=fopen("http://www.monsite.fr/", "r" );
while(!feof($fp)) {
$line.=fgets($fp, 8192);
}
preg_match('`<div id="center">(.+?)</div>`isU',$line , $matches);
print_r($matches);
echo '<div id="moncadre">'.$matches[0].'</div>'; |
je voudrais supprimer une ligne de texte au sein du array
Citation:
<a href="http://www.monsite.com/" id="toto">les routes à La Réunion</a>
j'ai essayé un tas de solutions sans succès
Code:
1 2 3 4
|
$tab = array($matches );
$element = 'les routes à La Réunion';
unset($tab[array_search($element, $tab)]); |
toutes solutions est bienvenue
a+ gilles