I am sending php array using serialise but the response is different. Here is my attempt
$array = serialize($out);
var_dump(serialize($array));
//string(58) "s:50:"a:2:{s:9:"sidebar-1";i:5;s:12:"footer-insta";i:2;}";"
The way I am sending this value,
echo '<div data-ad = '.$array.' class="ash_loadmore"><span>LOAD MORE</span></div>';
As I am sending the serialised value using ajax, the value that ajax response give me,
string(54) "a:2:{s:9:\"sidebar-1\";i:5;s:12:\"footer-insta\";i:2;}"
I need the exact value as I have unserialise again to make it array. Why there is extra \
and output is different.