• Hi guys,
    I wanna do something like this:

    <ul>
    <?php query_posts('category_name=PHP&showposts=5&orderby=title'); ?>
    <?php while (have_posts()) : the_post();
    $fixed_title = str_replace('PHP', 'PHP Script:', the_title());
    ?>
            <li><a href="<?php the_permalink(); ?>"><?php echo $fixed_title; ?></a> </li>
            <?php endwhile; ?>
    </ul>

    Note the str_replace() section of code. I’d like to know how l can set these values to variables. Any help would be greatly appreciated!

Viewing 7 replies - 1 through 7 (of 7 total)
Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘applying results form query_posts() to variables’ is closed to new replies.