|
php.net | support | documentation | report a bug | advanced search | search howto | statistics | random bug | login |
[2000-08-29 10:47 UTC] cynic at mail dot cz
$b = "abcdefgh" ;
foreach( $b as $y ) {
echo $y ;
} ;
Warning: Invalid argument supplied for foreach()
PatchesPull RequestsHistoryAllCommentsChangesGit/SVN commits
|
|||||||||||||||||||||||||||
Copyright © 2001-2025 The PHP GroupAll rights reserved. |
Last updated: Mon Dec 08 22:00:01 2025 UTC |
You need to cast your string as an array.. <?php $b = "abcdefgh" ; $b = (array)$b; foreach( $b as $y ) { echo $y ; }; ?> Works. James