<?php $value = "Gewerbe"; echo "Vor: " . $value; $value = preg_replace('/^(P|G).*$/', "$1", $value); echo "Nach: " . $value; ?>
You have javascript disabled. You will not be able to edit any code.