[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo

 
 ?php print( You have asked to purchase $dvd $video $cd 's - 
 Thank you) ?
 
 This prints out, You have bought 16 - Thank you for example, see the
 problem? How do I get it to print the variable name not just it's value?

Try with replacing your print with the following one:

print( You have asked to purchase DVD: $dvd VIDEO: $video CD: $cd 's - ...

it should work.

Bye
Gabriele



-- 
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]




[PHP] R: [PHP] Shopping with variables

2001-05-16 Thread Gabriele Biondo


 Thanks Gabriele :) Whilst waiting for your e-mail I figured out another
 way...Thought I would show you it just in case you ever find the 
 need to use
 this alternative:
 
 ?php print( You have asked to purchase .
   ($dvd ? DVD: $dvd :'').
   ($video ? Video: $video :'').
   ($cd ? CD's: $cd :'').
- Thank you) ?
 
 Best Regards
 
 Taz


This should work even better.

Ciao

Gabriele

-- 
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]