note 35906 rejected from function.sscanf by vincent
| From: | vincent@php.net | Date: | Thu, 18 Sep 2003 18:31:19 +0000 |
| Subject: | note 35906 rejected from function.sscanf by vincent | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-56721@lists.php.net to get a copy of this message | ||
Note Submitter: chuck@liderbug.com
----
Can I modify "$key"?
$data = array (4,7,4,2,3,8,4,3,2,3.......) var data from file();
foreach ($data as $key => $line) {
if $line == 8 then $key = $key + 2;
else do something with $line
}
otherwise if my data string contains X (8 in this case)
skip the next 2 entries.