Hey, this is just an example of what I'm trying to accomplish nothing more. I thought the only way to evalute the replacement string as php was to use the E modifier...
While this does work correctly, i'm getting this error for the following code.
Notice: Use of undefined constant TXT - assumed 'TXT' in D:\file.php(4) : regexp code on line 1
<?php
error_reporting(E_ALL);
$file = 'test.TXT';
echo preg_replace("/(.+\.)(txt)/ei","'$1'.strtolower($2)", $file);
//echo preg_replace("/(.+\.)(txt)/i",$1 . strtolower($2), $file);
?>
Can anyone shed some light on what i'm doing wrong.