Hi everyone,
I have a problem:
if($details[$i]['add_block'] != "") {
$splitbullets = explode("\r\n", $details[$i]['add_block']);
$r=0; foreach($splitbullets AS $b) {
$data['addr_1'] = $db->mySQLSafe($b);
$data['addr_2'] = $db->mySQLSafe($b);
$data['town'] = $db->mySQLSafe($b);
$data['state'] = $db->mySQLSafe($b);
$r++; if($r == 4) break; }
}
This is designed to take the information from a variable line by line seperated by \r\n and enter it into 4 seperate variables. as you can see I have to limit the loop to four as I only have four variables, if there is any more lines I will have to discard them.
It doesn't work..... Can anyone help?