Witaj Gościu! ( Zaloguj | Rejestruj )

Forum PHP.pl

> [PHP] string -> array
lunter
post
Post #1





Grupa: Zablokowani
Postów: 64
Pomógł: 0
Dołączył: 29.04.2004

Ostrzeżenie: (60%)
XXX--


Jak najszybciej i najprosciej ze stringa stworzyc tablice elementow jedno-bajtowych (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Przyklad:
$s='abcdefgh'; -> $a=array('a','b','c','d','e','f','g','h');


Probowalem tak jak w JS ( a=s.split('') ), czyli $a=explode('',$s). Niestety cos mi nie chce dzialac.

Czy da sie to zrobic bez uzywania 'for'/'while' (IMG:http://forum.php.pl/style_emoticons/default/questionmark.gif)

Ten post edytował lunter 11.07.2005, 12:00:04
Go to the top of the page
+Quote Post

Posty w temacie


Closed TopicStart new topic
2 Użytkowników czyta ten temat (2 Gości i 0 Anonimowych użytkowników)
0 Zarejestrowanych:

 



RSS Aktualny czas: 24.08.2025 - 16:48