Ok
I am new to PHP. I am writing functions that access a database. Can someone look at the code below and please tell me why the addPerson function in being called twice. It just doesn't make sense to me.
First the while loop executes twice then the function call after it is executed twice. What is the deal here. why would either be executed twice?
<?
//get all the files needed.
$d = opendir('./');
while (($f = readdir($d)) !== false)
{
if (is_file($f) && $f!='./' && $f!='..' )
{
require_once( './' . $f );
print "./" . $f . " was included.<br>";
}
}
//now that all my functions and classes are included
//call the function that we want
//but for reasons beyond my comprehension this
//function gets called twice. WHY????
print "<hr>Calling add Person<hr>";
$personResults = addPerson( "Robert", "Wohlers", "9/9/1968", "Yes" );
print_r($personResults);
?>