![Picture of Hipolito Delgado Picture of Hipolito Delgado](/picture/user/393021.jpg)
Hipolito Delgado - 2006-10-15 20:30:11
How I can change this example:
=============== BEGIN
$assoc = array(
array("Sales Person" => "Sam Jackson", "Q1" => "$3255", "Q2" => "$3167", "Q3" => 3245, "Q4" => 3943),
array("Sales Person" => "Jim Brown", "Q1" => "$2580", "Q2" => "$2677", "Q3" => 3225, "Q4" => 3410),
array("Sales Person" => "John Hancock", "Q1" => "$9367", "Q2" => "$9875", "Q3" => 9544, "Q4" => 10255),
);
=============== END
to this:
=============== BEGIN
$assoc = array(
while ($row = mysql_fetch_array($result)){
array("First Name" => "".$row["nombre1"]."", "Last Name" => "".$row["lastname"]."", "Email" => "".$row["email"].""),
}
);
=============== END
Without this error:
=============== BEGIN
Parse error: parse error, unexpected T_WHILE, expecting ')' in /xxx/xxx/xxx/www/xxx/xxx.php on line xx
=============== END