I have a string that contains 128.82. I want to split/separate them in 100 and 28.82.
128.82
100
28.82
var_dump(substr($kwh,0,3)); d
If you want to split 128.82 into 100 and 28.82 You can do it like this:
This will result in:
Array ( [0] => 100 [1] => 28.82 )