ID:               6414
 Comment by:       yuki_yew78 at yahoo dot com
 Reported By:      cynic at mail dot cz
 Status:           Closed
 Bug Type:         Scripting Engine problem
 Operating System: NT 4.0 SP5
 PHP Version:      4.0 Latest CVS (29/08/2000)
 New Comment:

me too


Previous Comments:
------------------------------------------------------------------------

[2000-08-29 11:12:32] [EMAIL PROTECTED]

You need to cast your string as an array..

<?php

$b = "abcdefgh" ;
$b = (array)$b;

foreach( $b as $y ) {
        echo $y ;
};

?>

Works.

James

------------------------------------------------------------------------

[2000-08-29 10:47:05] cynic at mail dot cz

$b = "abcdefgh" ;

foreach( $b as $y ) {
        echo $y ;
} ;

Warning: Invalid argument supplied for foreach() 

------------------------------------------------------------------------


-- 
Edit this bug report at http://bugs.php.net/?id=6414&edit=1

Reply via email to