On Friday, January 11, 2002, at 06:05  AM, Ford, Mike [LSS] wrote:

> Incidentally, I've occasionally had problems including a variable name 
> containing an underscore in a double-quoted string (e.g. "$num_recs 
> records retrieved"), where PHP tries to insert the value of $num 
> followed by the string "_recs", so I always {} those as well, just to 
> be on the safe side ("{$num_recs} ..." or "${num_recs} ..." both work.

You mentioned that {$num_recs} and ${num_recs} both work -- I'm familiar 
with the second form from bash shell scripting, but not the first.  Do 
they both work in all instances, or is one "preferred" over the other?

Thanks Mike

And sorry for making you repeat yourself (the first email I sent was 
incomplete but for some reason got sent, which you replied to and then 
the second, intended, email went out and that is when you wrote your 
second reply :).  I have a better understanding of using associative 
indexes from arrays in double-quoted statements now.


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]

Reply via email to