[Solved] Convert Javascript code to PHP code [closed] December 10, 2022 by Kirat [ad_1]Replace:longitude.indexOf("E") >= 0 With:strpos($longitude, 'E') !== FALSE And:longitude = longitude.substring(1); With:$longitude = substr($longitude, 1); Just change the variables for other occurrences.This uses strpos() and substr() 1[ad_2]solved Convert Javascript code to PHP code [closed]