note 90558 deleted from control-structures.foreach by danbrown
| From: | danbrown@php.net | Date: | Tue, 28 Apr 2009 13:00:58 +0000 |
| Subject: | note 90558 deleted from control-structures.foreach by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-153899@lists.php.net to get a copy of this message | ||
Note Submitter: timgolding_10 at hotmail dot com
----
You can also use foreach to loop through a string iterating through each character in that string
with the following:
<?php
$string = "hello";
foreach((array)$string as $char)
echo $char;
// hello
?>