Re: how to passing two dimension array
| From: | Noel Wade | Date: | Fri, 10 Jan 2003 08:59:50 +0000 |
| Subject: | Re: how to passing two dimension array | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-131061@lists.php.net to get a copy of this message | ||
You're missing string concatenation operators. I use "echo" instead of
"print" - but here's how it should look with either:
echo "<SELECT NAME=\"".$vari[$i][$j]."\">";
Explanation: The \" makes the double-quote appear in the final HTML, then
you have to use a plain " to end the text string. Then you use the .
concatenation operator, followed by your variable. To add further text, use
another . operator, then " to open up the text string, then \" for the HTML
close-quote, then the > to close the HTML tag, then " to close out the echo
or print statement. End with a ;
Let me know if that helps!
Take care,
--Noel
"Rizki Salamun" <kiputpce@isc.iitr.ernet.in> wrote in message
news:Pine.GSO.4.05.10301091911200.19568-100000@isc.iitr.ernet.in...
> hi there..
>
> I have a problem when I want to passing two dimension varible. I made this
> variable from html form.
>
> like this:
>
>
> <FORM method=post action="page2.php">
> <?
> print "<SELECT name=\"vari[$i][$j]\">";
> ?>
> <OPTION value="A">a
> <OPTION value="B">b
> .......
> .......
> </SELECT>
> </FORM>
>
> but when again I want to print the $vari[$i][$j, in the page2.php it
> seems doesnt recognize this variable.
>
>
> thanks
>
> -rizki-
>
>