problems with varaibles?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
weasel
Forum Commoner
Posts: 27
Joined: Sat Aug 16, 2003 3:27 pm

problems with varaibles?

Post by weasel »

i am geting this error...
Parse error: parse error in /home/triggerh/public_html/rs/process.php on line 3
when i use this script

Code: Select all

<?php
$result = $certs * $days * $price
echo 'If you get ' .$certs. 'a day for' .$days. ' and sell them for' .$price. ' each, you will make' .$result. ' when you are done.';
?>
any help please? thx
Paddy
Forum Contributor
Posts: 244
Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:

Post by Paddy »

No ; after the second line.
weasel
Forum Commoner
Posts: 27
Joined: Sat Aug 16, 2003 3:27 pm

Post by weasel »

if u mean...

Code: Select all

<?php 
$result = $certs * $days * $price 
echo 'If you get ' .$certs. 'a day for' .$days. ' and sell them for' .$price. ' each, you will make' .$result. ' when you are done.'
?>
this diddent work either :S
Paddy
Forum Contributor
Posts: 244
Joined: Wed Jun 11, 2003 8:16 pm
Location: Hobart, Tas, Aussie
Contact:

Post by Paddy »

Sorry, I meant there is no ; after the second line. That is producing your error. Correctly

Code: Select all

<?php
$result = $certs * $days * $price;
echo 'If you get ' .$certs. 'a day for' .$days. ' and sell them for' .$price. ' each, you will make' .$result. ' when you are done.';
?>
My apologies for the confusion.
weasel
Forum Commoner
Posts: 27
Joined: Sat Aug 16, 2003 3:27 pm

Post by weasel »

*kicks self*
thx... it works now :)
Post Reply