The button:
<button id="animals" type="button" value="push" >Push</button>
I have a php array:
$animalArray = array($dog, $cat, $horse, $lamb, $fox);
This is the jquery:
$(document).ready(function() {
$("#animals").click(function(){
// here comes the array push something like this
array_push($animalArray, $lion);
});
});
I know the 'array_push($animalArray, $lion);' php code and not possible to run in the jquery code. I have tried session to store array, but did not work for me. I appreciate every help. Thanks.