Salut,
bon finalement, je ne m'en sors toujours pas (voir mon precedent fil).
Voici la ligne :
$tabtmp = explode("//", file_get_contents($this -> fichier));
$tabshout = array ("pseudo"=>array_filter($tabtmp,
call_user_func(array($this,'getPseudo'))),
"texte"=>array_filter($tabtmp,
call_user_func(array($this,'getTexte'))));
et les fonctions :
function getPseudo ($tab) {
return array_keys($tab)%2==1;
}
function getTexte ($tab) {
return array_keys($tab)%2==0;
}
Sachant que tout ceci est dans une classe (et que la ligne problematique est dans une autre fonction membre de cette classe).
Et voici les erreurs generees :
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
24
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
24
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
24
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
28
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
28
Warning: array_keys() [
function.array-keys]: The first argument should
be an array in
/export/www/servers/www.printeria.de/htdocs/test/test/shoutbox.cls.php on
line
28
Or, a moins que je ne sois devenu debile, un explode() renvoie bien un
tableau de chaines :-( Et la fonction callback de array_filter() doit
se servir du tableau passe en 1er argument...a savoir le resultat de
mon explode().
Alors je ne sais pas.
Merci aux bonnes ames qui essayeront de m'aider !