I was searching for solution but finally I did it using my previous php number_format() which came in seeing @hmasif's solution.
Use this and you'll get your float - mysql match:
$floatmatch = number_format((float)$yourfloatvariable,5);
where 5 is five strings from decimal point. e.g. 7.93643