PHP – How to trim all values in array

Boring way:

for($i = 0; $i < count($arr); $i++){
    $arr[$i] = trim($arr[$i]);
}

The right way:

$arr = array_map('trim', $arr);

This will call function trim on every value in array $arr.

Write a Comment

Comment

Webmentions

  • hotovost za kamagra

    kanadská lékárna kamagra madica

    hwat ise cena kamagra

  • buy xifaxan buy dallas

    online order xifaxan cheap prices

    get xifaxan no prescription usa

  • buy rifaximin cheap europe

    online order rifaximin purchase online uk

    ordering rifaximin uk no prescription

  • how to buy avodart buy online no prescription

    how to buy avodart price netherlands

    get avodart price in canada

  • generic staxyn vancouver canada

    purchase staxyn generic pharmacy canada

    Buy staxyn usa cod

  • ordering itraconazole uk no prescription

    purchase itraconazole purchase england

    itraconazole in australia

  • ordering fildena price south africa

    get fildena generic from the uk

    discount fildena price netherlands

  • cheapest buy gabapentin buy safely online

    discount gabapentin usa buying

    ordering gabapentin generic switzerland

  • cheap flexeril cyclobenzaprine real price

    online order flexeril cyclobenzaprine generic version

    cheap flexeril cyclobenzaprine american express canada

  • how to buy dutasteride generic equivalent buy

    ordering dutasteride purchase singapore

    cheap dutasteride lowest cost pharmacy

  • buy cheap androxal canada fast shipping

    how to order androxal cheap canada

    cheapest buy androxal price new zealand

  • achetez kamagra en ligne avec livraison le lendemain

    medicament kamagra prescrire eu medicament pharmacie

    commander en ligne kamagra pas cher

  • buy cheap enclomiphene buy safely online

    canadian female enclomiphene

    ordering enclomiphene usa buying

  • Php Trim Array Values? 6 Most Correct Answers - Brandiscrafts.com

    […] + Read More […]

  • Php Trim Array? Best 22 Answer - Brandiscrafts.com

    […] + Read More Here […]