Jump to content

Can i pass multiple values in a query string


Lassie

Recommended Posts

I need to pass  a couple of values in a query string. Is this possible.

I have the following code but get a parse error.

function display_categories($cat_array)
{
  if (!is_array($cat_array))
  {
     echo 'No categories currently available<br/>';
     return;
  }
  echo '<ul>';
  foreach ($cat_array as $row)
  {
    $url = 'show_cat.php?region_id='.($row['region_id']).country=.($row['country'])';
    $title = $row['region_desc'];

echo '<li>';
    do_html_url($url, $title); 
    echo '</li>';
  }    
  echo '</ul>';
  echo '<hr />';
  }

Hi thanks for coming back. I get a parse error for that line which is

unexpected'='in ect line 33.

I am alos getting a fatal error . Call to undefine function do_html_url() which has worked perfectly well until now.Code for that function is

function do_html_url($url, $title)
{
  // output URL as link and br
?>
  <a href="<?php echo $url; ?>"><?php echo $title; ?></a><br />
<?php
}

Thanks for your help

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.