Convert String To Array Using While Loop