If you want every tenth to be converted to 0000, you can do this with a for loop. This may also take into account that the number of your values โโmay change.
$length = count($x_axis); for($i=0;$i<$length;$i+=10) { if($i%10==0) { $x_axis[$i] = '0000'; } }
EDIT:
People are very sensitive, so I changed the code so as not to kill kittens anymore.
source share