I am trying to convert a big array of numbers to a specific format which is +/-NNN.NNN. So, if I have these numbers:
$numbers1 = array(-1.23, 0.3222, 10, 5.5
Try using sprintf()
$numbers2[] = sprintf("%+07.3f", $fnum);