RE: [PHP] integer to string

2002-06-14 Thread Lazor, Ed
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

[PHP] integer to string

2002-06-14 Thread Pushkar Pradhan
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