On Wed, 2006-04-05 at 20:09, Al wrote:
> Tanner Postert wrote:
> > I don't think it's built in, so I was wondering ya'll would recommend as the
> > best way to convert int to string, not basic type casting, but converting to
> > the english word the int represents.
> >
> > Something like this:
> >
number range is relatively small... i'll just make an array, and reference
it by index;
$INT2STRING = array(
1=> "One",
2=>"Two",
30 = "Thirty");
Then reference it by:
print ($x ."=". $INT2STRING[$x]);
should work just fine. just wondering if there was an easier solution.
thanx for the help t
number range is relatively small... i'll just make an array, and reference
it by index;
$INT2STRING = array(
1=> "One",
2=>"Two",
30 = "Thirty");
Then reference it by:
print ($x ."=". $INT2STRING[$x]);
should work just fine. just wondering if there was an easier solution.
thanx for the help t
Tanner Postert wrote:
I don't think it's built in, so I was wondering ya'll would recommend as the
best way to convert int to string, not basic type casting, but converting to
the english word the int represents.
Something like this:
5 = "Five" or 20 = "Twenty"
What is your number range? 1..
4 matches
Mail list logo