Salut,
Au fur et à mesure je me suis perdu dans mon code, quand je l’exécute ça me fait erreur à la ligne 21, j'ai essayé d'enlever des accolades mais toujours rien...
<?php $tabLog=array(
array('ip'=>'172.16.230.233','get'=>'koala.jpg'), array('ip'=>'172.16.230.133','get'=>'koala.jpg'), array('ip'=>'172.16.230.133','get'=>'girafe.jpg'), array('ip'=>'172.16.230.233','get'=>'elephant.jpg'), array('ip'=>'172.16.230.133','get'=>'elephant.jpg'), array('ip'=>'172.16.230.133','get'=>'elephant.jpg'),
);
$tab=array();
foreach ($tabLog as $log){
$i=$log['ip']; if (array_key_exists($i,$tab)){
foreach ($tab as $indice=>$tab3){
if( $i==$indice){ $tab[$indice]=$tab3+1;
}
} } else{ $tab[$i]=1
}
}
foreach ($tab as $indice=>$tab2){ echo $indice , " : " , $tab2 , PHP_EOL;
}
?>
il m'affiche l'erreur :
PHP Parse error: syntax error, unexpected '}' in /home/Efrixs/prog.php on line 21
Merci d'avance 