Hi, I am trying to achieve this using php explode, but I am having problems with this.
here is my code
<?php
$capitals = array("A","B","C");
$word_break = "brandonBjakeCsullano";
$count = 0;
while ($count <=2)
{
$break = explode($capitals[$count++],$word_break)
}
echo $break[0];
echo "<br/>";
echo $break[1];
?>
using the code above, I can get this result:
brandonBjake
sullano
and this is what I'm trying to achieve
Brandon
Jake
sullano
Appreciate your help.
Any strategy is acceptable, not my style of implementation. thanks in advance
source
share