3 ms·
1. Your constructor has its entire contents commented out. 2. You should remove the $i in the function multitask(). You don't need it because the foreach is s
by jgrahamc 19y ago
1. Your constructor has its entire contents commented out.
2. You should remove the $i in the function multitask(). You don't need it because the foreach is storing $arrayofupto5tasks[$i] in $value.
function multitask($arrayofupto5tasks){
//I can easily manage 3-5 small tasks
$i = 0;
foreach ($arrayofupto5tasks as $value){
$query->storeIntoDB($value);
$execute->task($arrayofupto5tasks[$i]);
$i++
}
}
3. It's disappointing that your showDemo() function has a hard coded number 2 in it ($site = rand(0,2);) since you could get that from the array length. And also the header() bit has an extra ' in it.
4. Your learn() function returns false in one case and doesn't return anything in others.
- deleted 19y ago[deleted]
- nextmoveone 19y agoi was hoping someone would do this... 1.the constructor isnt commented out in text mate, or dreamweaver just here(yc). 2.i need the $i cause i store the task into the db then execute it. 3. i could have done that, and it would scale. but i didnt cause i only have 3 demos. you are probably right about the extra ' 4. need to review it, im on my phone right now
- jgrahamc 19y ago1. I wondered if that might be the case. 2. I don't understand this explanation, is $value destroyed by the call to storeIntoDB? At the very least your $i++ needs a terminating ;
- nextmoveone 19y agoyou are right! i should have went with a while loop