Forum Moderators: coopster
How can I turn this:
$couple=array("AB","CD","EF");
Into this:
$singles_good=array("A","B","C","D","E","F");
And NOT this:
$singles_bad=array(array("A","B"),array("C","D"),array("E","F"));
Something that would force:
$before=array("W","XY","Z");
Into:
$after_good=array("W","X","Y","Z");
And not:
$after_bad1=array("W",array("X","Y"),"Z");
Or:
$after_bad2=array("W","X","Z","Y");
<?
$newCouple = array();
for($i = 0; $i < sizeof($couple); $i++){
$thisCouple = $couple[$i];
$len = 0;
while($len < strlen($thisCouple)){
$thisPerson = substr($thisCouple, $len, 1);
if(!empty($thisPerson)){
$newCouple[] = $thisPerson;
}
$len++;
}
}
?>