Please help, I'm tearing my hair out here..I'm trying to write a simple script that I can use to offset some SAMI formatted subtitles...but the end use is fairly irrelevant, the point is I have gotten preg_replace to find the numbers within the subtitles but I can't perform any maths functions on it:
I have:
$varsubs = preg_replace('=(<SYNC Start\=)([>]*)=', '<SYNC Start='."$2".'>', $varsubs);
which returns:
<SYNC Start=6160>
<P Class=ENUSCC>my subtitle here
But I wuold like to subtract 4000 from the figure that is $2 (in this case, 6160) but I can't seem to get my preg_rplace to treat $2 as a number?.
PLEASE HELP IF YOU CAN......
CHEERS,
DRUCIFER.