I may be wrong, but I think you can compare strings and that compares their ASCii values (or that might just be JavaScript). For instance, the string "1" would be equal to 49, while "11" would be equal to 98. If that is true, then this script should work:
$data="1-11";
$data_pieces=explode("-",$data);
if($data_pieces[0]>$data_pieces[1]) {
$max=$data_pieces[0];
$min=$data_pieces[1];
}
else {
$max=$data_pieces[1];
$min=$data_pieces[0];
}
Hope that helps!
Happy coding! 🙂