Strings and Operators
From: JamesW (gingaloon_at_hotmail.com)
Date: 02/20/04
- Next message: Joe Smith: "Re: Replace string in existing file"
- Previous message: toylet: "Re: Regex problem, match if line contains <a>, unless it also contains <b>"
- Next in thread: dna: "Re: Strings and Operators"
- Reply: dna: "Re: Strings and Operators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: 20 Feb 2004 00:49:10 -0800
Sorry if this occurs twice, my nicely typed one just vanished. Anyway in brief:
I want to store a range in a string, e.g. '2-5'.
I tried $range = $numOne.'-'.$numTwo+1;
And $range stored the sum of $numOne+1!
I got it to work with,
$range = $numOne.'-'.($numTwo+1);
I understand why this works not not why my initial instinct didn't.
Could someone please enlighten me?
Thanks
James
- Next message: Joe Smith: "Re: Replace string in existing file"
- Previous message: toylet: "Re: Regex problem, match if line contains <a>, unless it also contains <b>"
- Next in thread: dna: "Re: Strings and Operators"
- Reply: dna: "Re: Strings and Operators"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|
|