[Resolved] Single quotes within single quotes (PHP)
I’m attempting to make the following line of code work:
<?php $temp = $wp_query; $wp_query= null; $wp_query = new WP_Query(); $wp_query->query('showposts=5'.'&paged='.$paged); query_posts('category_name= <?php global $wp_query; $postid = $wp_query->post->ID; echo get_post_meta($postid, <strong>'BlogCat'</strong>, true); ?> '.'&paged='.$paged); ?>
The BlogCat contains single quotes which are cancelling the other quotes and causing a syntax error. Cancelling the quotes (with a \)stops the error but the custom field is not called up. How do I fix this?
- The topic ‘[Resolved] Single quotes within single quotes (PHP)’ is closed to new replies.