Twinkie
Banned
- Messages
- 1,389
- Reaction score
- 12
- Points
- 0
There is a variable called flags created throughout my script that this function responds to. For some reason, with the variable set as dumped below, it does not print anything. Why??? *growls*
As an afterthought, it is amazing that no matter how experienced, or how large your applications are, it is always the little things that get you. If you think I am an idiot for asking this question, then you have not coded enough.
PHP:
function feedback($type) {
if (count($flags[$type]) > 1) {
echo "<div id=\"statusbox_" . $type . "\"><ul>\n";
foreach ($flags[$type] as $value) {
echo "<li>" . $value . "</li>\n";
}
echo "</ul></div>\n";
} else if (count($flags[$type]) == 1) {
echo "<div id=\"statusbox_" . $type . "\">" . $flags[$type][0] . "</div>\n";
}
}
feedback("success");
feedback("failure");
Code:
Array ( [failure] => Array ( [0] => WARNING: There are no valid services available. )
As an afterthought, it is amazing that no matter how experienced, or how large your applications are, it is always the little things that get you. If you think I am an idiot for asking this question, then you have not coded enough.
Last edited: