<?php
$array = array("0", "0", "F12345 / Q56T76");
if(strlen($array[2]) > 6 && preg_match('/[^a-zA-Z_\-0-9]/', str_replace(" ","",$array[2]))){
$error_message = "HFA Song Code contains characters other than alphanumerics and / at Line Number ";
}
echo $error_message;
?>