Or you can also use split function . That would break it in terms of space and store the result in arrays.