-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Add function array_to_str() in Array helper #525
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
Conversation
system/helpers/array_helper.php
Outdated
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.
function array_to_str($array = array(), $sep = ', ', $sep_last = '')
You can set default empty array.
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.
Yeah, that would probably be preferable.
|
What's the point of having |
system/helpers/array_helper.php
Outdated
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.
Delete $return variable?
|
@chrisberthe I think he forgot to delete it. |
|
Yes, I forgot to remove it |
|
I like this idea. It would actually be quite useful! Thanks for the pull request. |
|
This is way too outdated and is achieveable via 2 lines of code anyway. Please resubmit it based on the latest develop if you still want it. |
This function is the same as the implode() function, but you can change the string between the last and last-1 elements.