Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?php
$categoriesNames = array();
foreach ($categories as $categoryName) {
$categoriesNames[] = trim((string)$categoryName);
}
// так же лучше?
$categoriesNames = array_map("trim", $categories);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment