I have an array and I want change it to a multi dimensional array. How can i do this? : This is my array:

$array=["a2","a5","a7","b3","b8","b9"];

And i want change it to:

$result=["a"=>[2,5,7],"b"=>[3,8,9]; 