[PHP] xml parse error?
I'm trying to parse a simple xml file, but I keep getting a strange error at $node->name which returns #text. Is this normal or am I doing something wrong? >From what I understand, the $node->name should return "branch" but it returns #text. TIA Jon --- PHP Code - root(); $node = array_shift($root->children()); print $node->name; ?> --- xml_navigation.xml File - -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] help with Log() function
Hello, I'm having trouble getting a log formula to work. This forumla is supposed to return the number of payment required zero out a loan balance. /* n = - (LN(1-(B/m)*(r/q)))/LN(1+(r/q)) q = amount of annual payment periods r = interest rate B = principal m = payment amount n = amount payment periods LN = natural logarithm */ $q = 12; $r = 0.07; $B = 15; $m = 733; print -(log(1-($B/$m)*($r/$q)))/log(1+($r/$q)); <--- end snip > It keeps returning a NaN. I've checked the syntax over and over, but to no avail. Any help would be appreciated TIA Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php