Welcome Guest, Not a member yet? Register   Sign In
Simple php casting to float problem any help will highly appreciated
#1

[eluser]adityajoshi[/eluser]
Code:
<?php

echo "<html> ";
echo"<body>";
echo"[removed][removed]";
$lat = "[removed][removed](geoip_latitude());[removed]";
$lon ="[removed][removed](geoip_longitude());[removed]";

echo "<br>";

echo "<br>";
//echo date(', sunrise time : ' .date_sunrise(time(), SUNFUNCS_RET_STRING, $lat, $lon, 90, 1);
$zenith = ini_get("date.sunrise_zenith");

echo "<br>";
$myvar=0.0;
$a = $lat + $myvar;
echo $a;
$b = $lon+$myvar;;
$f =$b +$myvar;

echo $f;
echo"mark";
echo "<br>";
echo $b;
echo "<br>";

echo date("D M d Y"). ', sunrise time : ' .date_sunrise(time(), SUNFUNCS_RET_TIMESTAMP, $a,$b ,90.50, -4);
echo"&lt;/body&gt;";
echo"&lt;/html&gt;";
?&gt;

i don't know to convert string in to double i tried every thing but doesn't work its getting frustrating
the moment i convert string in to float by any method it gives me value of zero

the output of the code is


00mark
0
Sun Sep 04 2011, sunrise time : 1315115753




Theme © iAndrew 2016 - Forum software by © MyBB