<?php $fruitVariable = "apple banana orange pear"; $fruitArray = explode(' ', $fruitVariable); var_dump($fruitArray);
Standard input is empty
array(4) { [0]=> string(5) "apple" [1]=> string(6) "banana" [2]=> string(6) "orange" [3]=> string(4) "pear" }
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!