The simplest way to get the highest value in a field is this
$sql = "SELECT id_col FROM table ORDER BY id_col DESC LIMIT 1";
That will return one record, the one with the highest value in id_col according to sort order. (A smart db engine would not even need to access the table but return the value from the index on the column. Don't ask me if mysql can do that)
Drop the prefix E, cast the rest to integer and add 1, cast that back to a string and prepend the E.