Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

What is printed?

Name: Anonymous 2008-11-04 12:43

<?php

$foo = array('0' => 'Hello',
             '1' => 'Dave');

$zot = array('0' => 'Ping',
             '1' => 'Pong');

foreach ($foo as $bar) {
  foreach ($zot as $bar) {
    // ...
  }
  echo $bar;
}
 
?>

Name: Anonymous 2008-11-04 15:20

it outputs PongPong.
try using a real language:
#!/usr/bin/env perl
@foo = qw(Hello Dave);
@zot = qw(Ping Pong);
for $bar (@foo) {
  for $bar (@zot) {
    # ...
  }
  print $bar;
}

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List