hi, i'm a newbie here and so in php or any other programing languages. I found this site in google, and i think it's really good cuz you guys seem to know a lot about php, or i can say you guys are masters.
anyway, here is the problem:

on the first page, i have a link like this

<a href="watever.php?test=1>testing</a>

on the second page:

<?
$test = array(1=>"chicken", 2=>"beef");
?>

<? echo $test ?>

you can see, i'm trying to use the url of the first page to send the value to the second page....
but no way on earth, it's gonna work for me with that code. if any one knows how to, please show me; thanks a lot.

    Eh? Are you trying to pass an array through the url or just pass the key to use?

      um... i'm sorry, i don't really get what u mean but umm... see i'm trying to pass the value of array[1]

      $test = array(1=>"chicken", 2=>"beef");

      by using

      <a href="watever.php?test=1>testing</a>

      as i click on the link testing, i want it to sends the value "chicken" to the second page. I don't even know, if i'm on the right track.

        Like this?

        <?php
        $test = array(1=>"chicken", 2=>"beef");
        ?>
        <a href="watever.php?test=<?php echo $test[1]; ?>">testing</a> 

          um...i guess not...

          ok, for example. you have a link in one page. when you click the link, it sends the value to the second page.

          on the second page, it displays the value that you sent from the first page.

            Sure......

            Here's what I think you're trying to say

            # first page
            <a href="watever.php?test=1>testing</a>
            
            
            # second page
            <?php
            $array = array(1=>"chicken", 2=>"beef");
            # you can't overwrite the variable, so rename the array
            if(isset($_GET['test']) && array_key_exists($_GET['test'], $array)) {
               echo $array[$_GET['test']];
            }
            else {
               echo "Test not present in array";
            }

            ?>

            <? echo $test ?>

              man, u're so fast. i mean you reply after 1 second i post the message.

              i don't know, but it guess i didn't explain well.

              here it is:

              ok, #first page:

              there's a link: <a href="watever.php?test=1>testing</a>
              once you click on it, it sends the value to the second page.

              on the second page, there's a variable:

              $test = array(1=>"chicken.mp3", 2=>"beef.mp3");

              what i'm trying to do is put the array[1] into the embed src

              <embed src="<? echo $test ?>

                Write a Reply...