From 4f60ecd721a433c94fda0822e6019cedc49e235a Mon Sep 17 00:00:00 2001 From: Jamie Kitson Date: Thu, 16 Jan 2014 15:37:07 +0000 Subject: [PATCH] Remove new lines from tweets. Fixes #37 --- json-to-text.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/json-to-text.php b/json-to-text.php index 95082fc..c8308b9 100755 --- a/json-to-text.php +++ b/json-to-text.php @@ -5,7 +5,7 @@ $foo = json_decode($json_string); for ($i=0; $iid_str . "|"; echo $foo[$i]->created_at . "|"; - $tweet = $foo[$i]->text; + $tweet = str_replace("\n", " ", $foo[$i]->text); if (!empty($foo[$i]->entities->urls)) { foreach($foo[$i]->entities->urls as $u) { //print_r($u->url);