[Solved] make new array from existing array based on a delimiter in php


<?php

$arr = array(); //your array, your values.
$arrGonnaBe = array(); 
foreach($arr as $a){

    $exp = explode("##",$a);
    if(count($exp)>1){
        foreach($exp as $e){
            array_push($arrGonnaBe,$e);
        }
    }else{
        array_push($arrGonnaBe,$exp[0]);
    }
} 
print_r($arrGonneBe);
?>

0

solved make new array from existing array based on a delimiter in php