Skip to content
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

Generate an Array from a Rang with an appending optional Text. #1312

Closed
nadar opened this issue May 24, 2017 · 0 comments
Closed

Generate an Array from a Rang with an appending optional Text. #1312

nadar opened this issue May 24, 2017 · 0 comments

Comments

@nadar
Copy link
Contributor

nadar commented May 24, 2017

ArrayHelper::generateRange

 * 
 * ```php
 * $range = ArrayHelper::generateRange(1, 3, 'ticket');
 * // array (1 => "1 ticket", 2 => "2 ticket", 3 => "3 ticket")
 * ```
 * 
 * Using the pluralized texts:
 * 
 * ```php
 * $range = ArrayHelper::generateRange(1, 3, ['ticket', 'tickets']);
 * // array (1 => "1 ticket", 2 => "2 tickets", 3 => "3 tickets")
 * ```
@nadar nadar closed this as completed in badbb5c May 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant