Try:
$n = $soils[$i];
$soils[$i] = sprintf("%d", $n);
and if that doesn't work, print out $soils[$i] to see what it is.
> -Original Message-
> $soils[$i] = sprintf("%d", $soils[$i]);
>
> But doesn't seem to work, my program returned an error.
> P.S. : I'm using 4.0.6 otherwise wouldn't
I generate nos. using range function, e.g. I get 0 to 40.
I want to convert these nos. to string, I tried sprintf()
syntax:
$soils[$i] = sprintf("%d", $soils[$i]);
But doesn't seem to work, my program returned an error.
P.S. : I'm using 4.0.6 otherwise wouldn't have this problem.
-Pushkar S. Pra
2 matches
Mail list logo