php-general Digest 31 Dec 2012 08:31:53 -0000 Issue 8080

2012-12-31 Thread php-general-digest-help
php-general Digest 31 Dec 2012 08:31:53 - Issue 8080 Topics (messages 319973 through 319974): Re: how to build multilingual e-commerce website 319973 by: Sachin Raut Shopping Cart Discount System 319974 by: Karl DeSaulniers Administrivia: To subscribe to the digest,

php-general Digest 31 Dec 2012 20:37:29 -0000 Issue 8081

2012-12-31 Thread php-general-digest-help
php-general Digest 31 Dec 2012 20:37:29 - Issue 8081 Topics (messages 319975 through 319981): Re: Shopping Cart Discount System 319975 by: Ashley Sheridan variable placeholders in a text file 319976 by: Nelson Green 319977 by: Stephen 319978 by: Ashley

Re: [PHP] Shopping Cart Discount System

2012-12-31 Thread Ashley Sheridan
Karl DeSaulniers k...@designdrumm.com wrote: Hello Everyone, Hope all are well. Quick and hopefully painless question. Is there any examples on how to build a discount system into your shopping cart out there that anyone knows of? I am using MySQL and PHP. I have built one of my own so far, but

[PHP] variable placeholders in a text file

2012-12-31 Thread Nelson Green
Hello, I have created a simple function that prints a personalized greeting by reading the greeting contents from a file. I pass the user's name to the function, and the function reads the file contents into a string variable. I am then using str_replace to replace the word USER in the string

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Stephen
Yes! Easy standard stuff. $title = 'Mr.; $user_name = 'John Doe'; $message = Hello $title $user_name Just define the value for the variables before defining the value for the message. Note that $message has to use double quotes for the expansion. Also consider using HEREDOC instead

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Ashley Sheridan
On Mon, 2012-12-31 at 13:39 -0600, Nelson Green wrote: Hello, I have created a simple function that prints a personalized greeting by reading the greeting contents from a file. I pass the user's name to the function, and the function reads the file contents into a string variable. I am

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Stuart Dallas
Please excuse the top post, but this may be helpful: http://stut.net/2008/10/28/snippet-simple-templates-with-php/ -Stuart -- Sent from my leaf blower On 31 Dec 2012, at 19:59, Ashley Sheridan a...@ashleysheridan.co.uk wrote: On Mon, 2012-12-31 at 13:39 -0600, Nelson Green wrote: Hello,

RE: [PHP] variable placeholders in a text file

2012-12-31 Thread Nelson Green
On Mon, 31 Dec 2012 19:59:02, Ashley Sheridan wrote: ___ On Mon, 2012-12-31 at 13:39 -0600, Nelson Green wrote:   My question is, is there another way to do something similar, such as embedding a variable name directly into the text file? In other words,

RE: [PHP] variable placeholders in a text file

2012-12-31 Thread Nelson Green
On Mon, 31 Dec 2012 14:47:20 Stephen D wrote: Yes! Easy standard stuff. $title = 'Mr.; $user_name = 'John Doe'; $message = Hello $title $user_name Just define the value for the variables before defining the value for the message. Note that $message has to use double quotes for

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread tamouse mailing lists
On Mon, Dec 31, 2012 at 2:37 PM, Nelson Green nelsongree...@hotmail.com wrote: On Mon, 31 Dec 2012 14:47:20 Stephen D wrote: Yes! Easy standard stuff. $title = 'Mr.; $user_name = 'John Doe'; $message = Hello $title $user_name Just define the value for the variables before

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Bastien
Bastien Koert On 2012-12-31, at 4:58 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: On Mon, Dec 31, 2012 at 2:37 PM, Nelson Green nelsongree...@hotmail.com wrote: On Mon, 31 Dec 2012 14:47:20 Stephen D wrote: Yes! Easy standard stuff. $title = 'Mr.; $user_name =

RE: [PHP] variable placeholders in a text file

2012-12-31 Thread Nelson Green
On 2012-12-31, at 4:58 PM, tamouse mailing lists tamouse.li...@gmail.com wrote: I use the include(template) method for this alla time, it works great. Most especially for HTML emails coming from a web site to a group of users, just slick as anything. include does basically just what your

[PHP] Re: [PHP-DB] Re: [PHP] Shopping Cart Discount System

2012-12-31 Thread Karl DeSaulniers
On Dec 31, 2012, at 3:36 AM, Ashley Sheridan wrote: Karl DeSaulniers k...@designdrumm.com wrote: Hello Everyone, Hope all are well. Quick and hopefully painless question. Is there any examples on how to build a discount system into your shopping cart out there that anyone knows of? I am

Re: [PHP] Shopping Cart Discount System

2012-12-31 Thread Karl DeSaulniers
On Dec 31, 2012, at 3:51 PM, tamouse mailing lists wrote: On Mon, Dec 31, 2012 at 2:31 AM, Karl DeSaulniers k...@designdrumm.com wrote: Hello Everyone, Hope all are well. Quick and hopefully painless question. Is there any examples on how to build a discount system into your shopping cart

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread Stephen
On 12-12-31 03:37 PM, Nelson Green wrote: On Mon, 31 Dec 2012 14:47:20 Stephen D wrote: Yes! Easy standard stuff. $title = 'Mr.; $user_name = 'John Doe'; $message = Hello $title $user_name Just define the value for the variables before defining the value for the message. Note that

RE: [PHP] SOLVED: variable placeholders in a text file

2012-12-31 Thread Nelson Green
On Mon, 31 Dec 2012 1On Mon, 31 Dec 2012 17:47:00 Stephen D wrote: By using require_once instead of fopen and fread, I have simpler code and PHP evaluates the embedded variables in $markup without any need to use string functions. In your case, I would make the file greeter.php

Re: [PHP] variable placeholders in a text file

2012-12-31 Thread tamouse mailing lists
On Mon, Dec 31, 2012 at 5:47 PM, Stephen stephe...@rogers.com wrote: The common stuff for every page is defined in the file include.php. I define the variable $markup in that file. Here is the definition for $markup $markup=HEREDOC [[snippy]] HEREDOC; By using require_once instead of