I’m trying to explode and separate the results in 2 different arrays
One One_x
Two Two_xx
Three Three_xxx
Four Four_xxxx
I first want to explode the break line ( \n )..
then explode the space to come up with all One, Two, Three, Four in an array
AND One_x, Two_xx, Three_xxx, Four_xxxx in a different array
i tried to explode the break line
$ex = explode("\n", $numbers);
then
foreach($ex as $number){
$ex = explode(" ", $number);
}
but it seems a bit confusing to me,
How to solve this ?
Simplest way I think
EDIT: care you set
$exin loop … Not a good idea. Use another var