Some problem in calling php function from jquery ajax Page

I have made two program 1)PHP page 2) jquery page
php function will be called from jquery page
but it doesnot giving any output





TODO write content



        <input type="button" id="btn" onclick="savedata();">
        <div id="lengthQuestion"></div>
    </form>
</body>

-------------------------------------------------------------------PHP CODE----------------

<?php $arr=array(); $arr=$_POST['list']; function getdata($arr) { print_r($arr); } ?>

What is the error? I don’t see any syntax issues here

Sponsor our Newsletter | Privacy Policy | Terms of Service