Skip to content

Conversation

@reganmarie
Copy link
Contributor

  • 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

Description

Type of Change

  • Adding a new entry

Checklist

  • All writings are my own.
  • My entry follows the Codecademy Docs style guide.
  • My changes generate no new warnings.
  • I have performed a self-review of my own writing and code.
  • I have checked my entry and corrected any misspellings.
  • I have made corresponding changes to the documentation if needed.
  • I have confirmed my changes are not being pushed from my forked main branch.
  • I have confirmed that I'm pushing from a new branch named after the changes I'm making.
  • Under "Development" on the right, I have linked any issues that are relevant to this PR (write "Closes # in the "Description" above).

- 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
@caupolicandiaz caupolicandiaz self-assigned this Sep 12, 2023
@caupolicandiaz caupolicandiaz added php PHP entries new entry New entry or entries status: under review Issue or PR is currently being reviewed labels Sep 12, 2023
Copy link
Contributor

@caupolicandiaz caupolicandiaz left a 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'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Description: 'Formats a number with grouped thousands'
Description: 'Returns a given value formatted with grouped thousands.'

Subjects:
- 'Computer Science'
- 'Web Design'
- 'Web Development'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- 'Web Development'

Copy link
Contributor

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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `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:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
This is the output for the above example:
This will result in the following output:


```codebyte/php
<?php
echo number_format("500000");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
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
@reganmarie
Copy link
Contributor Author

@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!

  • Changed Description to 'Returns a given value formatted with grouped thousands.'
  • Removed a subject so there are only two
  • Changed argument to parameter in syntax
  • Changed "given in string format" to "given as a string" in both instances that wording was used in Syntax block
  • Changed output wording to "this will result in the following output" in example section
  • Added new line to Codebyte example
  • Changed 'arguments' to 'parameters' in Codebyte explanation

@SSwiniarski SSwiniarski linked an issue Sep 13, 2023 that may be closed by this pull request
3 tasks
Copy link
Contributor

@caupolicandiaz caupolicandiaz left a 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.

@reganmarie
Copy link
Contributor Author

Thank you @caupolicandiaz 😊

Copy link
Contributor

@SSwiniarski SSwiniarski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@reganmarie Looks good.

@SSwiniarski SSwiniarski merged commit ac0b531 into Codecademy:main Sep 17, 2023
@github-actions
Copy link

👋 @reganmarie
You have contributed to Codecademy Docs, and we would like to know more about you and your experience.
Please take a minute to fill out this four question survey to help us better understand Docs contributions and how we can improve the experience for you and our learners.
Thank you for your help!

🎉 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.
If you're appearing as anonymous and want to be credited, see here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Term Entry] PHP String Functions number_format()

3 participants