-2

When I try to run this code:

$arraytest = implode(", ", $array['playerList']); print $arraytest;

I'm getting this error:

Warning: implode() [function.implode]: Invalid arguments passed in /home/crafter/public_html/index.php

It's supposed to fetch info about my minecraft server.

I did var_dump() on it and it responded NULL. I automatically assumed it was an array since I got this script from the bukkit forums...

finst33
  • 141
  • 1
  • 3
  • 11

2 Answers2

4

$array['playerList'] must be an array, it probably isn't.

Lasar
  • 5,175
  • 4
  • 24
  • 22
4

$array['playerList'] probably isn't an array. You can check with: echo gettype($array['playerList']);

Michael Marr
  • 2,101
  • 14
  • 13