Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Newbie...Parse error 2

Status
Not open for further replies.

wudz

Programmer
Mar 28, 2001
135
GB

hi, can anyone point out my error in the line below, thought I was getting to grips with PHP...wrong..hi


if (($tot_wincredit < 2) && ($WINNING_BID => 10)){

And a quick explaination would help for future use..

Cheers

John

FLASH Man.
 
Try changing the => to >= and see if that makes any difference for you.

Explanation? Well... => is reserved as a command in PHP. I have no idea what it is called and I have no idea how to use it... I only use it in scripts I am copying from elsewhere (and even then I usually hack them around to get the functionality I need at the time).

I'm sure plenty of the locals here will chime in with a better answer than that [smile]

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Thanks BabyJeffy,

That was the problem, still got BASIC in the grey matter..that little problem had me messing about for an hour.....Thanks again.

Cheers

John
 
i think this notation is used for two reasons:

+ one tends to say "greater than or equals" when describing the notation. Thus it is more logical to go ">" "=" in the same order
+ and secondly there is scope for confusion with the object notation ->.

of course, i may be implying logic onto a decision of the php guys that was entirely arbitrary!
 
Thanks for that Sleipnir214... now I know what jargon to search about => on... a casual look at some google results showed me how to use => in constructing associative arrays:
Code:
$foods = array('meat' => 'Lamb', 'drink' => 'Coffee', 'dessert' => 'Ice Cream');
The array is called $foods and contains 3 elements that can be accessed using named indexes...
Code:
echo $foods[drink]; // "Coffee"
echo $foods[meat]; // "Lamb"

If I'm totally wrong on this... please let me know.

So jpadie... what is the name of the -> so I can go and do some useful googling on that as well.

Sorry to hijack this thread in this way... I think the contents remain useful, though.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Many thanks all for such a comprehensive answer..it is appreciated and taken onboard.

Great people on the forum ...

Cheers
John


Ps. While on a roll have another problem with SELECT..New post to follow as the answer may help someone else with a simlar problem.
 
Thanks guys - much appreciated (and even though you don't need the stars, you get them anyways).

As you can tell... I didn't learn php from a book... just "grew into it" almost by accident [smile] I don't know anyone irl who knows php - so for me it's been a slow process to get to grips with seemingly simple concepts (purely because they have a different name than I am familar with).

But I'm getting there with the occaisional helping hand from TT.

Cheers,
Jeff

[tt]Jeff's Page @ Code Couch
[/tt]

What is Javascript? FAQ216-6094
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top