Just as a note I had a bit to test and your version works
$str = "$c$a$b";
does return 012
all I was getting was 12
after looking at the manual I see that PHP was evaluating each piece as a
number so it expected that the built variable would be a number.
"Rory Browne" <[EMAIL PROTECTED]> wrote in
Normally it truncates the leading zeros if there are any. I will try your
method when I get a moment. got switched on project.
"Rory Browne" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
For the most part you can simply treat them as strings. What is
happening that shouldn't be hap
For the most part you can simply treat them as strings. What is
happening that shouldn't be happening, or what should be happening,
but isn't?
> let us say
> $a = 1;
> $b = 2;
> $c = 0;
$str_a = (string)$a;
$str_b = "$b"
> I would like to be able to
> $str = $c.$a.$b;
Does that not work? What
how do I set a number as a string
example
let us say
$a = 1;
$b = 2;
$c = 0;
I would like to be able to
$str = $c.$a.$b;
to result with
$str = 012;
is there something that I have missed or I guess the question should be what
did I miss
--
PHP General Mailing List (http://www.php.net/)
To unsu
4 matches
Mail list logo