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 />';
  }

Link to comment
Share on other sites

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

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.