You can't start a variable name with a number. -Rasmus
On Fri, 26 Oct 2001, jtjohnston wrote: > Friday night and I can't get my head around this. OK, so I don't get > this. (From A Reformer Perler?? - unitil now) > > I was getting > > "parse error, expecting `T_VARIABLE' or `'$'' in ..." > > until I exchanged the naming of these: > > $1a = 0; $1b = 0; $1c = 0; $1d = 0; $1e = 0; $1f = 0; > > (It won't accept $1a as a variable.) ... for these: > > $Onea = 0; $Oneb = 0; $Onec = 0; $Oned = 0; $Onee = 0; $Onef = 0; > > (Which is Absolute silliness, but I didn't create PHP !!) > > Now I cannot do: > > $Onea = $Onea + $survey->1a; > > without receiving: > > "parse error, expecting `T_STRING' or `T_VARIABLE' or `'{'' or `'$''" > > Can someone show me how to do this please? What the ***k am I doing > wrong now? A post & reply is always appreciated, > > John > > --------------snip---------------------- > > $myconnection = mysql_pconnect("localhost","",""); > mysql_select_db("",$myconnection); > > > $1a = 0; $1b = 0; $1c = 0; $1d = 0; $1e = 0; $1f = 0; > > $rows = mysql_query("select * from bookmark_unit4 ORDER by id desc"); > while ($survey = mysql_fetch_object($rows)) > { > //This does not work. I'm trying to ++ $1a witht he value of $survey->1a > > // $1a = $1a + $survey->1a; > // $1b = $1b + $survey->1b; > // $1c = $1c + $survey->1c; > // $1d = $1d + $survey->1d; $1e = $1e + $survey->1e; $1f = $1f + > $survey->1f; > } > > > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]