| 
 Posted by Chris on 01/21/05 20:07 
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
 
  
Navigation:
[Reply to this message] 
 |