Guys I need help!
I think I am on the right track with my logic but my code fails.
Can someone help? (my coding is weak no formal training).
Thanks,
Frank
$TotalString = "$total";
function Price($total)
{
if "$total" <= "24" then "$total" * "3200"
else
if "$total" >= "25" and "$total"
> $TotalString = "$total";
> function Price($total)
> {
> [...]
> return "$Price";
> }
>
> echo "$Price";
It is not clear what your problem is, or what you tries to achive.
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
> You cannot use comparision operaters (<=, >=, >) with strings.
> When you put quotes around your variable it defines it to
> php as a string, which translated means that it's words, not
> numbers. So you could say
> if ("$total" == "lowprice") {
> code code code
> }
>
> but not say ("$tot
mp; $total <= 49) {
code code code
}
-Original Message-
From: Frank Tudor [mailto:[EMAIL PROTECTED]
Sent: Wednesday, August 13, 2003 10:40 AM
To: [EMAIL PROTECTED]
Subject: [PHP-WIN] PHP My first function (help)
Guys I need help!
I think I am on the right track with
> Guys I need help!
>
> I think I am on the right track with my logic but my code fails.
> Can someone help? (my coding is weak no formal training).
I do not want to be rude, but you should try to pick up
basic programming principles, and then you wants to get
yourself familiar with the syntax