Seo Forum

Coding & Programming => PHP Forum => Topic started by: chinmay.sahoo on 07-19-2016, 05:49:32

Title: Demolitions
Post by: chinmay.sahoo on 07-19-2016, 05:49:32
Assuming the piece of text we've been using contains line feed characters, we could use the explode function to break it up into an array of lines:

Quote<?php
$text = <<<EOD
PHP (recursive acronym for "PHP: Hypertext Preprocessor") is awidely-used Open Source general-purpose scripting language that
is especially suited for Web development and can be embedded
into HTML.
EOD;
$lines = explode("\n", $text);
echo "<table border=\"1\">\n";
foreach ($lines as $line) {
echo "<tr>\n<td>$line</td>\n</tr>\n";
}
echo "</table>\n";
?>