Fix new lines in news
This commit is contained in:
parent
2c31a3fa6a
commit
9b6f98d2c8
2 changed files with 2 additions and 0 deletions
1
gori.php
1
gori.php
|
@ -15,6 +15,7 @@
|
|||
if(isset($_POST['vijest'])) {
|
||||
$vijestiFile = file_get_contents($openShiftFolder."vijesti.csv");
|
||||
$vijest = $_POST['vijest'];
|
||||
$vijest = str_replace("\n", "<br />", $vijest);
|
||||
if(strpos($vijest, ',') !== FALSE) {
|
||||
$vijest = str_replace('"', '""', $vijest);
|
||||
$vijest = '"'.$vijest.'"';
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
$counter = 0;
|
||||
foreach ($newsFile as $news) {
|
||||
$nesto = str_getcsv($news);
|
||||
if($nesto.length < 3) continue;
|
||||
$timesArray[$counter] = $nesto[0];
|
||||
$imagesArray[$counter] = $nesto[1];
|
||||
$newsArray[$counter] = $nesto[2];
|
||||
|
|
Loading…
Add table
Reference in a new issue