(hope this is in the right forum!)
Am trying to echo category numbers from the functions file.
$myString="6"in the functions file (6 being the cat number.)
It works in the following code on index.php
<a href="<?php echo get_category_link($myString);?>"><?php echo $myString; ?> </a>
But I cant get it to work in a loop query. I thought this would work…..
<?php query_posts('cat='<?php the_category($myString); ?>' &showposts=10'); ?>
But it doesnt. Would anyone have any ideas? Im really stuck as my PHP is pretty bad!! Thanks!
- The topic ‘Help with a php echo and category number’ is closed to new replies.