-
Couldn't load subscription status.
- Fork 4.3k
Create number-format.md, closes #3219 #3240
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create number-format.md, closes #3219 #3240
Conversation
- Created number-format.md on filepath docs/content/php/concepts/string-functions/terms/number-format/number-format.md - Added Title, Description, Subjects, Tags, and Catalog Content - Added description, syntax, example, and codebyte example - Ran through 3 online plagiarism checkers to ensure 100% unique wording and description, passed with 100% - Followed content and style guidelines -Checked for spelling and grammar errors
Ran yarn format:all to pass verify lint and formatting
….com/reganmarie/docs into PHP-String-Functions-number_format()
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reganmarie I've completed my initial review. Please update the entry, and tag me when you've finished making changes. Thanks
| @@ -0,0 +1,54 @@ | |||
| --- | |||
| Title: 'number_format()' | |||
| Description: 'Formats a number with grouped thousands' | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| Description: 'Formats a number with grouped thousands' | |
| Description: 'Returns a given value formatted with grouped thousands.' |
| Subjects: | ||
| - 'Computer Science' | ||
| - 'Web Design' | ||
| - 'Web Development' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - 'Web Development' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
there should only be two items under subjects
|
|
||
| - `number`: The number to format. | ||
| - `decimals`: Optional argument that sets the number of digits after the decimal point. If not given, the number returned will be a whole number. | ||
| - `decimal_point`: Optional argument that specifies the decimal separator and should be given in string format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `decimal_point`: Optional argument that specifies the decimal separator and should be given in string format. | |
| - `decimal_point`: Optional parameter that specifies the decimal separator and should be given as a string. |
| - `number`: The number to format. | ||
| - `decimals`: Optional argument that sets the number of digits after the decimal point. If not given, the number returned will be a whole number. | ||
| - `decimal_point`: Optional argument that specifies the decimal separator and should be given in string format. | ||
| - `separator`: Optional argument that specifies the thousands separator and should be given in string format. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| - `separator`: Optional argument that specifies the thousands separator and should be given in string format. | |
| - `separator`: Optional parameter that specifies the thousands separator and should be given as a string. |
| ?> | ||
| ``` | ||
|
|
||
| This is the output for the above example: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| This is the output for the above example: | |
| This will result in the following output: |
|
|
||
| ```codebyte/php | ||
| <?php | ||
| echo number_format("500000"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| echo number_format("500000"); | |
| echo number_format("500000"), "\n"; |
|
|
||
| ## Codebyte Example | ||
|
|
||
| The following codebyte example can be run and calls the `number_format()` method two times. The second call uses the optional `decimals`, `decimal_point`, and `separator` arguments. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| The following codebyte example can be run and calls the `number_format()` method two times. The second call uses the optional `decimals`, `decimal_point`, and `separator` arguments. | |
| The following codebyte example can be run and calls the `number_format()` method two times. The second call uses the optional `decimals`, `decimal_point`, and `separator` parameters. |
- Changed Description - Removed a subject so there are only two - Changed argument to parameter - Changed "given in string format" to "given as a string" - Changed output wording to "this will result in the following output" - Added new line to Codebyte example - Changed 'arguments' to 'parameters' in Codebyte explanation
|
@caupolicandiaz I didn't want to spam your inbox by responding to each individual revision, so these are the changes I made in the latest commit!
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reganmarie This is ready for a second review.
|
Thank you @caupolicandiaz 😊 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@reganmarie Looks good.
|
👋 @reganmarie 🎉 Your contribution(s) can be seen here: https://www.codecademy.com/resources/docs/php/string-functions/number-format Please note it may take a little while for changes to become visible. |
Description
Type of Change
Checklist
mainbranch.