Reputation: 8012
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.
Upvotes: 1
Views: 809
Reputation: 325
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.
Upvotes: 1
Reputation: 144
Try adding a sorf field or something where would be
id value
1 I
2 II
3 III
and so on
Upvotes: 1