Was wondering why str_replace doesn't work in my set of code, yet exploding it works.
$plate = "AAA 1234";
$plateNum = str_replace(' ', '', $plate);
$plateNum = explode(' ', $plateNum);
$updatedPlateNum = '';
foreach ($plateNum as $string) {
$updatedPlateNum .= $string;
}
For testing purposes, "AAA 1234", the space should be omitted
edit: added $plate