You are here: bug in str_split function? « PHP « IT news, forums, messages
bug in str_split function?

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]


Удаленная работа для программистов  •  Как заработать на 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

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