From 4fe07c91e876a96b93111aaac0da126e312369f0 Mon Sep 17 00:00:00 2001 From: Jack-Benny Persson Date: Mon, 28 Jul 2014 10:55:29 +0200 Subject: [PATCH] Refactored the word wrapping --- 1stPara.php | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) mode change 100644 => 100755 1stPara.php diff --git a/1stPara.php b/1stPara.php old mode 100644 new mode 100755 index 6b235b2..3872094 --- a/1stPara.php +++ b/1stPara.php @@ -10,12 +10,6 @@ $url = $argv[1]; $data = shell_exec("curl -s $url"); preg_match("/\(.*)\<\/p\>/", $data, $match); $string = strip_tags($match[1]); -$strArray = explode("\n", wordwrap($string, 60)); +print (wordwrap($string, 60, "\n") . "\n"); -foreach($strArray as $line) -{ - print $line . "\n"; -} - -//print strip_tags($match[1]) . "\n"; ?>