$arg1 = $row1['asd'];
$arg2 = $row2['asd'];
$f1 = $row1['asd'] + 65 * float atan(float $arg1);
$f2 = $row2['asd'] + 65 * float atan(float $arg2);
I'm fairly new to PHP, I think I missed a few quotes so any correction would be very appreciated!
$arg1 = $row1['asd'];
$arg2 = $row2['asd'];
$f1 = $row1['asd'] + 65 * float atan(float $arg1);
$f2 = $row2['asd'] + 65 * float atan(float $arg2);
I'm fairly new to PHP, I think I missed a few quotes so any correction would be very appreciated!
Remove the float
's
$f1 = $row1['asd'] + 65 * atan($arg1);
$f2 = $row2['asd'] + 65 * atan($arg2);
You've probably picked part of this code from the PHP documentation of this function, right?
If yes, the term before the function name is the type it returns, and the term before the argument is the type of data it expects as argument.
If you want to cast your values to float
before passing them to atan
, you can use the floatval
function.