Question

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

Était-ce utile?

La solution

Try adding a sorf field or something where would be

id value
1    I
2    II
3    III

and so on

Autres conseils

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.

Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top