06-05-2008, 12:32 AM
|
#2 (permalink)
|
|
is cute and cuddly
Join Date: Mar 2008
Location: Vegas, Baby
Posts: 963
Thanks: 31
|
The problem seems to have something to do with PHP assuming you're assigning an array reference to a string - I don't know if this will work, but what if you tried initializing the two arrays before using them in the while loop?
PHP Code:
$cod_vendedor = array(); $nome_vendedor = array();
If just adding that doesn't work, maybe initialize them and then try this?
PHP Code:
while($row = mysql_fetch_array($result)) { array_push($cod_vendedor, $row['cod_vendedor']); array_push($nome_vendedor, $row['nome_vendedor']); }
Is your new host running a newer version of PHP than your old host was? The only reason [] shouldn't work is if it thinks you're trying to assign an array value to something that's already been set as a string, or if it's somehow causing duplicate key names, from what I gather.
-m
|
|
|
|