and printing it to a file with var_export and I expected something like this
array(
'acme',
'ajax',
);
But instead I got this
array (
0 => 'acme',
1 => 'ajax',
);
I'm guessing their technically the same, but is there anyway to get it to print the way i expected?
use foreach or implode
I don't see how I can implement either to do what I want. Not sure how i would use forEach, would I just recreate the array? Implode just gives 'acmeajax'
$a = array( 'acme', 'ajax', ); print(implode($a,PHP_EOL)); Result: acme ajax
Обсуждают сегодня