[eluser]stef569[/eluser]
Hi, I saw my errors and correct them,
1. I was overwriting my array (no that wasen't part of the plan :d)
2. I thought I got an aray when it was an object.
3. Input validation
4. Testing i didn't know about the print_r will look into it.
This works:
Code:
// Create array of days as key with content(userId)
//@param $query db record object.
function createEvents($query) {
if ($query->num_rows() > 0) {
foreach ($query->result() as $row) {
$curDay = $row->event_Bday;
while($curDay <= $row->event_EDay) {
echo 'Day: '.$curDay.' UserId: '.$row->user_id.'<br/>';
$events[$curDay++] = $row->user_id;
}
}
} else {
echo 'No Events for this month.';
}
return $events;
}
Thx for the help once again, I realy learnt alot from your code examples
Mayby once I can help you out

so we are even again