note 35906 added to function.sscanf
| From: | chuck at liderbug dot com | Date: | Thu, 18 Sep 2003 18:28:41 +0000 |
| Subject: | note 35906 added to function.sscanf | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-56720@lists.php.net to get a copy of this message | ||
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.
----
Manual Page -- http://www.php.net/manual/en/function.sscanf.php
Edit Note -- http://master.php.net/manage/user-notes.php?action=edit+35906
Delete Note -- http://master.php.net/manage/user-notes.php?action=delete+35906&report=yes
Reject Note -- http://master.php.net/manage/user-notes.php?action=reject+35906&report=yes