Voting

: four plus zero?
(Example: nine)

The Note You're Voting On

T-Soloveychik at ya dot ru
11 years ago
Text lines numeration:
<?PHP
// Multieline text:
$Text = "
Some
Multieline
text
for
numeration"
;

// For count:
$GLOBALS["LineNUMBER"] = 1;

// Replace linestart on number:
PRINT preg_replace_callback("/^/m",function ()
{
return
$GLOBALS["LineNUMBER"]++." ";
},
$Text);

?>

1
2 Some
3 Multieline
4 text
5 for
6 numeration

<< Back to user notes page

To Top