Skip to content

Commit 1cd9aa9

Browse files
authored
Update README.md
1 parent 639827b commit 1cd9aa9

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,12 @@ $snippet = (new CodeSnippet())
111111
echo "Snippet line count: " . count($snippet->getLines()) . PHP_EOL;
112112
```
113113

114+
To return an array containing the line numbers for the snippet, use `getLineNumbers()`:
115+
116+
```php
117+
print_r($snippet->getLineNumbers());
118+
```
119+
114120
### Returning the snippet as a string
115121

116122
Return the contents of the snippet as as string using the `toString()` method or by casting the snippet to a string directly:

0 commit comments

Comments
 (0)