Hello and welcome to HCM
The symptoms that you have mentioned- swollen foot, extreme pain, inability to walk or bent the toes point to a fracture
Sometimes a kind of fractures
known as hair line fracture occur suddenly without a significant trauma.
The next step to be done is to get a X-ray in AP and lateral view.
The X-ray will pick up the fractue.
Another possibility is of a sprain
in which tehre is tear in the ligaments.
In either cases X-ray foot is needed.
Both will require a cast, a little longer in case of fracture.
Thanks and take care
Dr shailja P Wahal