jburelli Posted September 5, 2011 Share Posted September 5, 2011 Hi Guys!! how can I resolve this deprecated code line: eregi("<BLOCK:$block>(.*)</BLOCK:$block>", $source, $new_tpl); and this otherone: eregi_replace("<BLOCK:$block>(.*(</BLOCK:$block>))", "{block:$block}", $source); thanks, too much!! Quote Link to comment https://forums.phpfreaks.com/topic/246438-some-help-here-please/ Share on other sites More sharing options...
jcbones Posted September 5, 2011 Share Posted September 5, 2011 What are you looking for in the string? This function will have to be changed from a POSIX pattern to a PRCE pattern. Quote Link to comment https://forums.phpfreaks.com/topic/246438-some-help-here-please/#findComment-1265488 Share on other sites More sharing options...
jburelli Posted September 5, 2011 Author Share Posted September 5, 2011 this is the entire function: Someone told me, use preg_match not eregi functions, but I dont know sintax. function temp_lock($source,$block) { eregi("<BLOCK:$block>(.*)</BLOCK:$block>", $source, $new_tpl); //$block = $new_tpl[1]; //$source = eregi_replace("<BLOCK:$block>(.*(</BLOCK:$block>))", "{block:$block}", $template); $output['tpl'] = $new_tpl[1]; $output['clean'] = $new_tpl[1]; $output['src'] = eregi_replace("<BLOCK:$block>(.*(</BLOCK:$block>))", "{block:$block}", $source); $output['add'] = ""; $output['done'] = ""; return $output; } Quote Link to comment https://forums.phpfreaks.com/topic/246438-some-help-here-please/#findComment-1265491 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.