mootools php faith camera linux

php

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
die('<pre>'.print_r($a,true));



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