Function GetTile(intOS) ' input coords to get base tile filename
Dim GetTileResult, GetTileCh4
GetTileCh4 = mid(intOS,4,1)
if GetTileCh4 < 5 then GetTileCh4 = 0 else GetTileCh4 = 5 end if
GetTileResult = left(intOS,3) & GetTileCh4 & "00"
GetTile = GetTileResult
End Function
That is a little function I wrote to round a 6 digit number to the nearest 500. I have re-made this in php using round() but it dosent goive me exaclty the same results as the above. Can someon help me exactly re-create the above in php please?
I firstly need to grab the 4th character. Then if it is lower than 5, change it to 0, or if it is 5 or over, chage it to 5. then join that to the first 3 characters and add to zeros to the end, leaving me with a 6 digit number
Many thanks in advance - Mark