<?php $parcel = "32.1"; $supparcel = ""; $arr = explode('.',$parcel); if (count($arr) > 1){ $supparcel = $arr[1]; } if ($supparcel != ""){ echo $arr[0] . '-' . $subparcel; } else { echo $arr[0]; } ?>
You have javascript disabled. You will not be able to edit any code.