$sectionID = get_sub_field('title');
$sanitizedID = sanitize_title_with_dashes($SectionID);
echo $sanitizedID;
To remove any numbers from the ID, add the following code:
// Remove numbers from the ID
$ID = preg_replace('/\d+/', '', $ID);
Have any questions or comments? Write them below!