Re: [PHP] Variables - showing onpage
Biph wrote: I have a question, and maybe I'm an idiot (alright not maybe). I can't get the damned variables to stop showing their variable names on the screen, like a variable $stock_quote appears in the HTML as $stock_quote, what the hell am I doing wrong? I'm using Win2K to test a site on my own computer using Apache2, but all variables from MySQL to PHP are just showing up as the variable name and not the value in the HTML.Any help would be nice. example: is apprearing as: the price is $price in the HTML instead of: the price is 1.00 PHP will not interpret variables inside of single quotes. Use double quotes, or break out of the quotes... print("the price is: $price") print('the price is: ' . $price) http://us3.php.net/manual/en/language.types.string.php -- By-Tor.com It's all about the Rush http://www.by-tor.com -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
RE: [PHP] Variables - showing onpage
You have to put it between double quotes. Jeroen -- Thou shalt not follow the NULL pointer, for chaos and madness await thee at its end. (Henry Spencer) Politics.be op imode! http://i.politics.be/ -Original Message- From: Biph [mailto:[EMAIL PROTECTED] Sent: Sunday, November 30, 2003 8:54 AM To: [EMAIL PROTECTED] Subject: [PHP] Variables - showing onpage I have a question, and maybe I'm an idiot (alright not maybe). I can't get the damned variables to stop showing their variable names on the screen, like a variable $stock_quote appears in the HTML as $stock_quote, what the hell am I doing wrong? I'm using Win2K to test a site on my own computer using Apache2, but all variables from MySQL to PHP are just showing up as the variable name and not the value in the HTML.Any help would be nice. example: is apprearing as: the price is $price in the HTML instead of: the price is 1.00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
Re: [PHP] Variables - showing onpage
On Sunday 30 November 2003 15:54, Biph wrote: > I have a question, and maybe I'm an idiot (alright not maybe). I can't get > the damned variables to stop showing their variable names on the screen, > like a variable $stock_quote appears in the HTML as $stock_quote, what the > hell am I doing wrong? I'm using Win2K to test a site on my own computer > using Apache2, but all variables from MySQL to PHP are just showing up as > the variable name and not the value in the HTML.Any help would be nice. > example: > $price = 1.00 > print('the price is: $price') > ?> > is apprearing as: > the price is $price > in the HTML instead of: > the price is 1.00 manual > Chapter 7 > Strings -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * -- Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general -- /* I had the rare misfortune of being one of the first people to try and implement a PL/1 compiler. -- T. Cheatham */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php
[PHP] Variables - showing onpage
I have a question, and maybe I'm an idiot (alright not maybe). I can't get the damned variables to stop showing their variable names on the screen, like a variable $stock_quote appears in the HTML as $stock_quote, what the hell am I doing wrong? I'm using Win2K to test a site on my own computer using Apache2, but all variables from MySQL to PHP are just showing up as the variable name and not the value in the HTML.Any help would be nice. example: is apprearing as: the price is $price in the HTML instead of: the price is 1.00 -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php