I have a class with an empty array like so:
private $detail = array();
Then I have a function later on in the class:
function get_array_value()
{
$detail_info = ' ';
foreach($detail as $key=>$value)
{
$detail_info .= CreateDetailEntry($value);
}
}
when I create an instance of my class and try to use the function get_array_value, I get this:
PHP Notice: Undefined variable: detail in blah blah file line ??
Is there a problem with creating an empty array that gets filled in later?