Re: varibles defination

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



edwardspl@xxxxxxxxxx wrote:
>>>How can we define and display the varibles by using for loop
>>>function ?
>>
>><?php
>>for ($x=0;$x<10;$x++){
>>  $func[$x]=$x;
>>}
>>print_r($func);
>>?>
> 
> 
> If I want to define a set of varibles ( two dimension array, eg : $func[0,0] )

$func[0,0] is not valid syntax. you mean $func[0][0]

> and via the varibles of form tag ( format, eg : $_GET["varname"] or
> $_POST["varname"] )...
> How about the example ?

watch what happen to $_POST when you stick these fields in your form
and submit it:

<input type="text" value="a" name="test[a]" />
<input type="text" value="b" name="test[b]" />
<input type="text" value="c" name="test[c]" />
<input type="text" value="d1" name="test[d][]" />
<input type="text" value="d2" name="test[d][]" />



> 
> Edward.
> 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux