I have a classes in roman number like

    I
    II 
    III
    IV
    IX
    V
    VI
    VII
    XI Commerce
    XI Arts 
    XI Science

i have tried sorting by roman number function but due to extra string are there with XI class like arts, commerce so its now working as per aspected. Is there any way to come out with any result.

enter image description here

有帮助吗?

解决方案

Try adding a sorf field or something where would be

id value
1    I
2    II
3    III

and so on

其他提示

explode string first to get the roman numerals.

$str = explode(" ",$yourstring);
$roman = $str[0]; //the roman numerals
$subject = $str[1]; //the subject;

then make a function to convert roman numerals to numbers.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top