- preg_replace_callback: documentation ( source)
- print_r: documentation ( source)
<?php
$selfTable = 'songs';
$relTable = 'artists';
$string = '$content AS content,
CONCAT_WS(
".",
$types.alias,
layout_templates.custom_item_id
),
id';
echo preg_replace_callback('#\$([\w]+)\.([\w]+)#', function($match) {
print_r($match);
}, $string);