Hi Mark,
That would be a great idea, but it's not my code.

The client has used some kind of program that's created these long variables.
It generates the pages using the questions stripped of spaces as the variable 
(I'm guessing).
These are then hard coded to various pages.

I thought they may be a limit on the length of a $var name, but there doesn't 
seem to be.

The page gathers info from a form, save it in a flat file, and emails the 
client.
It looked rather strange when I first saw it, as there's about 30 questions.
As it seems to be working and they are happy, I'm leaving well alone.


----- Original Message ----- 
From: "Mark" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Friday, August 12, 2005 2:17 PM
Subject: Re: [php-list] Max length of a var


> This might be a silly question, but is there some reason you don't
> use an array? Something like:
> 
> $question[1]['text']="anything good has happened since our product
> was used";
> $question[1]['answer']=$response;
> 
> where response is what is typed into a form (Im assuming it's for a
> form - possibly a bd assumption). that way, you have more
> flexibility, and are not hard coding odd variable names. (unless,
> you're using variable variable,s, inwhich case this is a moot point).
> 
> Did I qualify that response enough? ;-)
> 
> M



------------------------ Yahoo! Groups Sponsor --------------------~--> 
<font face=arial size=-1><a 
href="http://us.ard.yahoo.com/SIG=12hphrqgk/M=362329.6886308.7839368.1510227/D=groups/S=1705005703:TM/Y=YAHOO/EXP=1123864926/A=2894321/R=0/SIG=11dvsfulr/*http://youthnoise.com/page.php?page_id=1992
">Fair play? Video games influencing politics. Click and talk back!</a>.</font>
--------------------------------------------------------------------~-> 

Community email addresses:
  Post message: [email protected]
  Subscribe:    [EMAIL PROTECTED]
  Unsubscribe:  [EMAIL PROTECTED]
  List owner:   [EMAIL PROTECTED]

Shortcut URL to this page:
  http://groups.yahoo.com/group/php-list 
Yahoo! Groups Links

<*> To visit your group on the web, go to:
    http://groups.yahoo.com/group/php-list/

<*> To unsubscribe from this group, send an email to:
    [EMAIL PROTECTED]

<*> Your use of Yahoo! Groups is subject to:
    http://docs.yahoo.com/info/terms/
 



Reply via email to