<?php $name = "Kate O'Henry-Smith"; $arrDelChars = [' ','\'','-']; if ( ctype_alpha( str_replace( $arrDelChars, '', $name ) ) === false ) { exit( "Name must contain letters and spaces only\n" ); } print_r($name);
You have javascript disabled. You will not be able to edit any code.