Pavleck, Jeremy D. wrote:
 Greetings,

PHP Rookie

that explains why you may not have bumped into 'foreach' yet :-)

...

here with a quick question - how do I go through 2 arrays at
once with different keys?
I'd like to combine these 2 arrays into one:

for ( $i = 0; $i < sizeof($logicalDrive); $i++) {
echo "$arrLogDrive[$i]<br />\n"; }

for (reset($logicalDrive); $i = key($logicalDrive); next($logicalDrive))
{
        echo "$i: $logicalDrive[$i]<br />\n";
}

something like:

foreach ($arrLogDrive as $key => $val) {
        echo isset($logicalDrive[$key]) ? $logicalDrive[$key]: $value;
}

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to