Boo wrote:
Using printf, I can get the output I want:
printf("ch:\t6%u\n",$ch);
The %u allows me to convert a negative value to an unsigned decimal
number.
My problem is that I don't want to output this to the screen. I need
to store it as a variable. Is there any way to do this? Thanks!
I'm new to PHP so can't absolutely answer your question. But, as I
understand it, PHP was designed taking ideas and methods from Perl, C++,
and various other languages. Most all have an sprintf function. Search
the manual for sprintf and I'll bet you've found exactly what you are
looking for.
--
Stan McCann "Uncle Pirate"
http://stanmccann.us/pirate.html
Webmaster/Computer Center Manager, NMSU at Alamogordo
Coordinator, Tularosa Basin Chapter, ABATE of NM; AMA#758681; COBB
'94 1500 Vulcan (now wrecked) :(
http://motorcyclefun.org/Dcp_2068c.jpg
A zest for living must include a willingness to die. - R.A. Heinlein