How do I remove NaN values from an array in php? To remove any other element, I found this solution, but I can’t get it to work for NaN. https://stackoverflow.com/a/7225113/9606753 Context: I am reading data from an rrd Database. I want to calculate the mean across several data entries, however at least one of them is float(NaN). Answer Use array_filter
Tag: nan
Removing NaN from date time returned in javascript
I am working on yii2. In my javascript, I have a formula through which I am getting some data. The data is then passed to chart and chart renders it. var arry_kwh = []; arry_kwh =