Variable in the Loop
-
Hi,
I would like to add a variable in the loop.
this is my loop:`
<?php
global $post;
$myposts = get_posts(‘include=3,6,13,’);
foreach($myposts as $post) :
setup_postdata($post);
?>
do stuff
<?php endforeach; ?>`Instead of 3,6,13, I would like to add a variable called $myposts.
How do I do this, I really don’t understand.P.S. I’m sorry, this is the wrong forum…
Thanks in advance!!
`
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘Variable in the Loop’ is closed to new replies.