I've just started studying PHP and I came across something called associative arrays. It allows you to do the following:

PHP Code:
$soccerTeam = array();
$soccerTeam['andy'] = 10
The equivalent in JS would be:

var soccerTeam = new Array();
soccerTeam['andy'] = 10;
I tried this out in JS in FireBug and it seemed to work. My only question is, is it a good idea? I could not find any JS documentation on it and I even found an article that said it was a bad practice. And if it is bad in JS, is it bad in PHP as well?