It normally should not matter, as PHP is a "loosely typed" language and will convert types automatically when required, at least in the vast majority of cases. But if you really need to cast it to an integer, the simplest way is:
$x_axis= (int) $values;
"Please give us a simple answer, so that we don't have to think, because if we think, we might find answers that don't fit the way we want the world to be."
~ Terry Pratchett in Nation