Is there anyway to break up a line like the following using PHP coding?
Gen:1:1: In the beginning God created the heaven and the earth.
I want to break this line up into Book, Chapter, Verse, and actual Verse. This line has colons for this specific reason, however using the split() function is only splitting up the book names and deleting what is left over. Here is the code I've been using, I know it's not what I want to do but will illustrate the example I'm speaking of.
for ($index=0; $index < count($text); $index++)
{
$textlist = split(":", chop($text[$index]));
echo ($textlist[0] . "<br />");
}
?>
Any help what so ever is much appreciated.
Gen:1:1: In the beginning God created the heaven and the earth.
I want to break this line up into Book, Chapter, Verse, and actual Verse. This line has colons for this specific reason, however using the split() function is only splitting up the book names and deleting what is left over. Here is the code I've been using, I know it's not what I want to do but will illustrate the example I'm speaking of.
Code:
<?$text = file("OT.dat"); for ($index=0; $index < count($text); $index++)
{
$textlist = split(":", chop($text[$index]));
echo ($textlist[0] . "<br />");
}
?>
Any help what so ever is much appreciated.