I have this code which gives me post_permalink
in a while loop.
<?php
$value[] = array();
while ($the_query->have_posts()) : $the_query->the_post()
$value[] =array(
'post_permalink' => get_permalink()
);
endwhile; ?>
Now the thing is that I'm getting the links
as
Array ( [0] => Array ( [post_permalink] => link )
[1] => Array ( [post_permalink] => link )
[2] => Array ( [post_permalink] => link )
[3] => Array ( [post_permalink] => link ) )
The way I want it to be:
Array ( [post_permalink] => link
[post_permalink] => link
[post_permalink] => link
[post_permalink] => link )
i.e: All of the links in one array instead of four subarrays. Please help!