Absolute #$#$ silliness

From: Date: Fri, 26 Oct 2001 22:49:18 +0000
Subject: Absolute #$#$ silliness
Groups: php.general 
Request: Send a blank email to php-general+get-72524@lists.php.net to get a copy of this message
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; }

« previous php.general (#72524) next »