How to convert number to scientific notation in Codeigniter? : I am working on web-based application build with Codeigniter.

My question is how to convert number to scientific notation?
For some reason, I need to display number from user input from **250** to **2.5 x 10<sup>2</sup>** and **25** to **2.5 x 10<sup>1</sup>**, etc.