send 1 dim array as hidden type via form

From: hubert (hubert_beaumont_at_binuscan.com)
Date: 10/22/04


Date: 22 Oct 2004 03:43:35 -0700

Hi,
I am willing to send an array via a form. For some reasons it doesn't
work, is somebody can tell me why?

Sending code as follow:

        $testarray = array_fill(0, 255, 0);
        

<form name="form1" method="get" action="http://www.blablabla">
          <input name="imageField" type="image" src="histo.gif"
width="300" height="20" border="0">
                   <input type="hidden" name="redarray" value = "<? echo $testarray
?>" >
        </form>

Receiving page as follow:

        $RedHistogram = array_fill(0, 255, 0);
        $result = count($RedHistogram);
        print "Size 1: ";
        print $result;
        print "<br>";

                $RedHistogram = $_GET['redarray'];
                print $RedHistogram;
                print "<br>";

        $result = count($RedHistogram);
        print "Size 2: ";
        print "<br>";
        print $result;

So size 1 returns:255
Size 2 returns:1



Relevant Pages

  • Re: g77 and DVF works fine but ifc causes a run-time error! Any ideas?
    ... Just because an array of size 1 has only one element, ... The standard does not allow you to pass a named scalar ... automatic code writing software isn't likely to special-case ... There are also a bunch of reasons that are a bit on the strage side ...
    (comp.lang.fortran)
  • Re: ReDimed Array size
    ... It also leads to possibilities of out-of-memory problems owing to memory fragmentation. ... to automatically redim the array instead of raising the error should not be an overhead. ... that has many reasons for being one or the other--there are historical reasons of compatibility as well as applications where one or the other makes common sense. ... I think it's a remain from the old days and also an inheritance from low level languages, but it's not good for a high level language. ...
    (microsoft.public.vb.general.discussion)
  • Re: dgemm subroutine in BLAS - I think Ive cracked the difference, please confirm
    ... > see what I'm talking about), so in the current state of memory allocation, ... padding for performance reasons - a memory subsystem might work much better ... so you would perform a 1024x1024 FFT on a 1025x1024 array ...
    (comp.lang.fortran)
  • Re: dgemm subroutine in BLAS - I think Ive cracked the difference, please confirm
    ... > if the stride is not a power of two, for instance (this is true on many ... > - there are algorithms, some recursive, that operate on smaller subarrays ... > of the whole array. ... > There are likely additional reasons... ...
    (comp.lang.fortran)
  • Re: Dynamic allocation of a triple indirection
    ... > I'm trying to dynamically allocate memory to an array of strings ... for reasons that have been discussed many times before. ... > The reason for building this array is to feed it to sscanfto parse ... > characters to my sscanfoutput strings. ...
    (comp.lang.c)