I have an array with chunks of values.
$value = array(
array(3075,15,461.25,16,535.05),
array(3075,15,461.25808,16,535.05),//to be removed
array(3075,15,461.2,16,535.05234)//to be removed
);
I need to remove the rows that has values with more than 2 decimal places. How do i do that?
You can use
strlen(substr(strrchr($x, "."), 1))to count the decimals andarray_filterto remove any array value with more than 2 decimalsOutput