You are here: Re: explode « All PHP « IT news, forums, messages
Re: explode

Posted by Oli Filth on 09/14/05 19:41

Steee said the following on 14/09/2005 16:38:
> is there a function like explode which breaks up a single word into an
> array?
>
> $word = "single";
>
> to
>
> $word[0] = "s";
>
> $word[1] = "i";
>
> $word[2] = "n";
>
> etc

Ummm:

$word = "single";
echo $word[0] . " " . $word[1] . " " . $word[2];

Although, this isn't a proper array.

Use str_split() if you want it to act as an array in other ways, e.g.
usable in foreach, and array functions.




--
Oli

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация