1

I am pulling a value from a cookie and would like to echo it out inside a query post. I think I am doing something wrong with the single and double quotes. This is probably an easy fix for a PHP pro.

$showCntryID = $_COOKIE["altairUniCountry"];

$args = array(
'orderby' => 'title',
'order' => 'ASC',
'meta_query' => array(
    array  (
        'key' => 'country',
        'value'=>'show-'. echo $showCntryID; .'
    )
    )
);
query_posts( '$args' );
JacobLett
  • 427
  • 6
  • 18

1 Answers1

4

You dont need echo, you are not outputting anything, just building an array:

'value'=>'show-'. $showCntryID,
Steve
  • 20,703
  • 5
  • 41
  • 67