I am interested in replacing real-time numerical matches and manipulating them with hexadecimal.
I was wondering if this is possible without using a foreach loop.
so that...
every thing in between:
= {numerical value} ;
will be manupulated to:
= {hexadecimal numeric value} ;
preg_match_all('/\=[0-9]\;/',$src,$matches);
Is there any answer to preg_match_all, so instead of preforming the loop after that I can manipulate them as soon as preg_match_all catches every match (in real time).
this is not the correct syntax, but simply you can understand:
preg_match_all_callback('/\=[0-9]\;/',$src,$matches,{convertAll[0-9]ToHexadecimal});
source
share