I need to create random pairs of numbers (floats) within a specific range. These are mainly points for the pairs [Lat, Lng] (longitude - latitude coordinates)
I thought it would be very easy with
<?php echo (rand(0,60).'.'.rand(0,99999999999999).' || ');
but he did not give me control over the number of numbers after the floating point (resolution) that I need.
So the next step:
<?php echo (rand(0,60*pow(10,6)))/pow(10,6).' || ';
and it works. like .. sometimes it gives results like
22.212346 || 33.134 || 36.870757 ||
but hey - the coordinates are from -90 to 90 (lon) and from -180 to 180 (lan) - what about the minus?
echo (rand(0,-180*pow(10,9)))/pow(10,9).' || ';
which should do this .. and putting everyone together should give me some kind of random string, like
23.0239423525 || -135.937419777
so after all this introduction - here Is my question (s).
, , - ? PHP?
3,4 5, , 6 ( ) - php? , ?
, "" - - . PHP -- ?
? ( )
, , / ! ( , :-)