Ascii Characters Not Concatenating

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
zunebuggy
Forum Commoner
Posts: 41
Joined: Wed Aug 27, 2008 1:22 pm

Ascii Characters Not Concatenating

Post by zunebuggy »

I have a for loop that has a variable $myCharVar that has is set by using the ord and mid of a larger string. If I do a var_dump of $myCharVar I can see the output is (correctly): int(72) int(101) int(108) int(108) int(111) int(32) int(87) int(111) int(114) int(108) int(100) and in the for loop I also have $NewWord .= chr($myCharVar); but if I do echo $NewWord it is blank or if I do var_dump on $NewWord it returns a few string(0) "" and a few string(1) " ". I have checked the spelling of the variables. I wondered if this was an obvious mistake I made.
Thank you.
User avatar
requinix
Spammer :|
Posts: 6617
Joined: Wed Oct 15, 2008 2:35 am
Location: WA, USA

Re: Ascii Characters Not Concatenating

Post by requinix »

Post code.
zunebuggy
Forum Commoner
Posts: 41
Joined: Wed Aug 27, 2008 1:22 pm

Re: Ascii Characters Not Concatenating

Post by zunebuggy »

Sorry. I figured it out. I had a function between the two variables and was altering the wrong variable. it wasn't ovious to me before but I see it clearly now.
Post Reply