Implode?

Ask about general coding issues or problems here.

Moderators: macek, egami, gesf

Post Reply
seandisanti
php-forum Fan User
php-forum Fan User
Posts: 973
Joined: Mon Oct 01, 2012 12:32 pm

Re: Implode?

Post by seandisanti » Mon Feb 25, 2013 9:59 am

str_split() first to create your array, then implode it to a string.

Code: Select all

<?php
$letters= 'ABCDEFGHIJKLMNOPQRSTUVWXYZ';
$letters = str_split($letters,1);
$letters = implode (' - ',$letters);
echo $letters;

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests