Your code is bogus.  You probably want:

  $vary[$i] = $y;

And $vary(100) also makes no sense.

Also, why are you looping through the $InputY array and putting all the
values into $vary?  Why not just do $vary = $InputY;  ?

If it is because you need to renumber the indices, have a look at the
array_values() function.

-Rasmus

On Thu, 7 Nov 2002, Remon Redika wrote:

> Parse error: parse error, unexpected '=' in
> /home/intra/Inventroot/software/savedata.php on line 35
>
> <?php
>
> $vary(100);
> $i = 0;
>
> foreach($InputY as $y){
>        $vary($i) = $y;   <---------line 35
>        $i++;
> }
>
> foreach($Nama_Software as $x){
>        $insertq = "Insert into NSoftware (X, Y) values
> ('$InputX','$vary($i)')";
>        echo $insertq."<br>";
>        mysql_query($insertq);
>        $i++;
> }
>
> ?>
> Thank's
>
>
> Jon Haworth writes:
>
> > Hi Remon,
> >
> >> I try this script with php, but i found an Error.
> >
> > It would be helpful if you could show us this error message.
> >
> >> $vary(100);
> >
> > At the very least, you should change this line to
> >
> > $vary = array();
> >
> > Cheers
> > Jon
> >
> > --
> > PHP General Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>


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

Reply via email to