skip to Main Content

PHP – Calculate Array with Non Numeric Value

From mycsv.csv $data[7] has these: 4294967296/4294967296 4294967296 8589934592/8589934592 I want to calculate and put GB, so they become like this: 4GB/4GB 4GB 8GB/8GB What I did: <?php $a = str_ireplace("/"," ",$data[7]); echo (floor($a/1000000000))."GB"; But it gives error for the ones…

VIEW QUESTION
Back To Top
Search