Posted by Jerry Stuckle on 09/02/06 14:23
comp.lang.php wrote:
> Joshie Surber wrote:
>
>>Have you tried forcing your INT into a STRING, or making sure it is a
>>string? If it is being treated as an INT padding is automatically
>>disregarded.
>
>
> How do you force an int into a string? In Java it would be:
>
> int stuff = 8;
> System.out.println(stuff.toString());
>
> Or something like that
>
> Phil
>
>
First of all, this is Java, not PHP. Two different languages which have
to be handled two different ways - don' t confuse the two. And BTW -
your example won't work for Java, either (no toString method for an int).
As to converting to a string - you can so something like:
$str = sprintf('%d', $var);
--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
[Back to original message]
|