May 13, 2005 #1 james0816 Programmer Joined Jan 9, 2003 Messages 295 Location US Really simple question .... using php .... how do you convert a number string to a character string? thx
Really simple question .... using php .... how do you convert a number string to a character string? thx
May 13, 2005 #2 sleipnir214 Programmer Joined May 6, 2002 Messages 15,350 Location US PHP is loosely-typed. It will perform the conversion automatically if the circumstances call for it. What are you trying to do? Want the best answers? Ask the best questions! TANSTAAFL!! Upvote 0 Downvote
PHP is loosely-typed. It will perform the conversion automatically if the circumstances call for it. What are you trying to do? Want the best answers? Ask the best questions! TANSTAAFL!!
May 13, 2005 Thread starter #3 james0816 Programmer Joined Jan 9, 2003 Messages 295 Location US i have a random number being generated and i want to append that to a text string. Upvote 0 Downvote
May 13, 2005 #4 sleipnir214 Programmer Joined May 6, 2002 Messages 15,350 Location US Just do the concatenation. PHP will know what you mean. $number = 3; $text = 'foo'; $text .= $number; print $text; Will output: foo3 See http://www.php.net/language.types.type-juggling Want the best answers? Ask the best questions! TANSTAAFL!! Upvote 0 Downvote
Just do the concatenation. PHP will know what you mean. $number = 3; $text = 'foo'; $text .= $number; print $text; Will output: foo3 See http://www.php.net/language.types.type-juggling Want the best answers? Ask the best questions! TANSTAAFL!!
May 13, 2005 Thread starter #5 james0816 Programmer Joined Jan 9, 2003 Messages 295 Location US that got er...thx Upvote 0 Downvote