|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2002-04-29 06:17 UTC] sasha at xxi dot co dot il
$result=mysql_query("SELECT id, cdate FROM newspaper WHERE path='".substr($a, strrpos($a, "/")+1, strlen($a))."'") or die (mysql_error());
$rec=mysql_fetch_array($result);
$e=pow(2, $rec[id]); //Warning!
it's looks like what pow() function can't convert $rec[id] variable from string to integer automatically.
Using
$rec[id]=stettype($rec[id], "int");
helps
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 15 08:00:01 2025 UTC |
Further to my last post, here is the code in question: function NUM_HOLDS($level_hull) { global $level_factor; return round(pow($level_factor, $level_hull) * 100); } as stated in the previous post, $level_factor = 2 and $level_hull = 0; It also occurs on this line: $shipspeed = pow($level_factor, $playerinfo[engines]); Could it be because in my case, I am using an associative array as the second value?