mootools php faith camera linux


Code Challenge -
Double an Array

what is wrong with this code:

// pull these columns from the pages table
$a = array('title','keywords','description','body');

// double the array with columns postfixed "_spanish"
for($i=0;$i<count($a);$i++) $a[] = $a[$i].'_spanish';

// dump the columns that will be pulled

1 point for guessing the output (without running it)
10 points for coming up with one line that fixes it

first to respond with the most points wins.

Last Updated: 2009-07-07 14:23:19
Creative Commons License Jay Johnston is a Zend Certified Engineer in PHP 5 LPI-ID: LPI000102450, Verfication Code: wmnnt56y2k  ... Jay Johnston is certified as LPIC-1 by the Linux Professional Institute