[Solved] how to change php functions send result to jquery ajax [closed]


right code for this

<?
// http://huddak.net/bbs/board.php?bo_table=cm_free&wr_id=3629
function remove_nr($str) {
    $reg_e = array('/\n/', '/\r/', '/\"https://stackoverflow.com/", "/<\/script>/i"); 
    $reg_p = array(' ', ' ', '\\"', "<\/SCRIPT>"); 

    return preg_replace($reg_e, $reg_p, $str);
}
?>

<script type="text/javascript">
$("#test1").html( " <? echo remove_nr( trim( db_cache("main_top_naver_cache", 300, "naver_popular('naver_popular', 4)")))?> " ); 
</script>

you can do time consuming php code to jquery loading.
this make your page loading to fantastic.

solved how to change php functions send result to jquery ajax [closed]