- var_export: documentation ( source)
- preg_replace: documentation ( source)
<?php
$a = array (
0 =>
array (
'one' => 'A {bad} thing.',
'two' => 'So far so {bad}.',
),
1 =>
array (
'one' => 'A {bad} thing, bis.',
'two' => 'So far so {bad}, bis.',
),
);
$b = preg_replace('/\{bad\}/', 'good', $a);
echo '$b = ';
var_export($b);
echo ';', "\n";