Hi, I got a text file in the following format and i want to strip the informatoin then insert into mysql datbase.
@AL-FÁTIHA (A ABERTURA)
[1.1] Em nome de Deus, o Clemente, o Misericordioso.
[1.2] Louvado seja Deus, Senhordo Universo,
[1.3] Clemente, o Misericordioso,
[1.4] Soberano do Dia do Juízo.
[1.5] Só a Ti adoramos e só de Ti imploramos ajuda!
[1.6] Guia-nos à senda reta,
[1.7] À senda dos que agraciaste.
Assume I have a table has 4 fields ..they are name,chapter,versno,verse.
so first line of this text file should be $name,secondline should [$chapter.$verseno]$verse.
How can i strip the text.?
here is the code i am trying ..
<?php
$array = file("1.txt");
foreach($array as $row) {
$line = explode(what code goes here ?);
print " $name $chapter $verseno:<br> $verse";
}
?>
any help will be great..