bug in str_split function?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Sorry if this is a double post, I left the subject off the first one.
// I'm running this test code....

///////////////////////// start
<?PHP
 $test='this is test';
 echo $test;
 $test2=str_split($test);
 echo $test2;
 for($i=0;$i<count($test2);$i++)
 {
  echo $test2[$i]."<br>";
 }
?>
///////////////////////// end

// I'm expecting
this is a test
Array
t
h
i
s

i
s

a

t
e
s
t

// the output is ....
this is test

The problem seems to be related to the str_split function not returning an
array. Any ideas?

Chris



---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.817 / Virus Database: 555 - Release Date: 12/15/2004 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux