
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'

<?php $s = 'abcde'; ?>
<?php /** * Replace str_split() * * @category php * @package PHP_Compat * @link http://php.net/function.str_split * @author Aidan Lister <aidan@php.net> * @version $Revision: 1.14 $ * @since php 5 * @require php 4.0.0 (user_error) */ if (!function_exists('str_split')) { function str_split($string, $split_length = 1) { return false; } $split_length = (int) $split_length; if ($split_length < 1) { return false; } return $matches[0]; } } ?>