A
Anonymous
Guest
Hey guys,
I just don't fuckin know what else to do here. Trying to run thru an array while grabbing some data out of a mysql database and just writing that data to a variable, which is made out of the name of the weekday that comes out of the array and some other standard text...
Here is the code:
The error that I am getting is the following:
Parse error: parse error, unexpected '=', expecting ',' or ';' in statistics.php on line 10
Corrected the line number so it will fit this code, maybe somebody can help me out, I'd be really thankful.
-Eddie
I just don't fuckin know what else to do here. Trying to run thru an array while grabbing some data out of a mysql database and just writing that data to a variable, which is made out of the name of the weekday that comes out of the array and some other standard text...
Here is the code:
Code:
$weekdays_eng = array("Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday");
$weekdays_var = array("monday", "tuesday", "wednesday", "thursday", "friday", "saturday");
for($a=0; $a<6; $a++) {
$query = "SELECT * FROM salary WHERE DAYNAME(card_date)='$weekdays_eng[$a]' AND callagent_id!='0' AND cancelation='0' AND card_time<='14:00:00'";
$result = mysql_query($query);
$lines = mysql_num_rows($result);
if($lines != "0") {
for($i=1;$i<=$lines;$i++) {
while($dataset = mysql_fetch_array($result)) {
$weekdays_var[$a]._cards_beforenoon_sold = $dataset['card'] + $weekdays_var[$a]._cards_beforenoon_sold;
}
}
}
else {
$weekdays_var[$a]._cards_beforenoon_sold = "0";
}
}
The error that I am getting is the following:
Parse error: parse error, unexpected '=', expecting ',' or ';' in statistics.php on line 10
Corrected the line number so it will fit this code, maybe somebody can help me out, I'd be really thankful.
-Eddie