Re: Why parse error?

From: Date: Mon, 04 Feb 2002 18:40:51 +0000
Subject: Re: Why parse error?
References: 1 2  Groups: php.windows 
Request: Send a blank email to php-windows+get-11838@lists.php.net to get a copy of this message
Pardon my error ... I didn't mean that you use & for arrays ... doeth! But it reminded me of Perl, nonetheless. @ for arrays, % for hashes, & to call functions ... anyway .... moving along. Switch out the & for $ and should be fine. =] nicole 'doeth!' amashta www.aeontrek.com "Nicole Amashta" <430ntr3k@bellsouth.net> wrote in message news:20020204183502.5942.qmail@pb1.pair.com... > You have to remember this is PHP and not Perl. You do not need to use the > ampersand in front of arrays. You always use the $ for variables, including > arrays and hashes. > > Replace that & with a $, and you should be fine. > > Good luck ! :) > > Nicole Amashta > www.aeontrek.com > > > "Andrew Ziem" <andyziem@acmemail.net> wrote in message > news:3C5AF322.19C5B406@acmemail.net... > > Hi, > > > > I am trying to retreive stored data, and I can't figure out why I > > receive this PHP error--even after reading PHP documentation and looking > > at examples-- > > > > "Parse error: parse error in c:\vol\php\e.php on line 10" > > > > The following is my simplified code: > > > > <?php > > > > mysql_connect("localhost", "root"); > > > > mysql_select_db("volunteers"); > > > > $result = mysql_query("SELECT * FROM names WHERE id=$id"); > > > > &line = mysql_fetch_row(&result); > > > > $first = $line["first"]; > > $middle = $line["middle"]; > > $last = $line["last"]; > > > > $street = $line["street"]; > > $city = $line["city"]; > > $zip = $line["zip"]; > > > > ?> > > > > > > > > -- > > Andy Ziem > > Is Jesus Your Answer? > > http://www.ChristianAnswers.net/gospel > > > > > > > > > > > >

« previous php.windows (#11838) next »