Link to home
Start Free TrialLog in
Avatar of Robert Saylor
Robert SaylorFlag for United States of America

asked on

PHP string issue

I am setting a value but it is being changed. Not sure why.

$field .= '&timestamp_unix=#{timestamp_unix}';

Open in new window


It is outputted as "×tamp_unix=#{timestamp_unix}" instead of "&timestamp_unix=#{timestamp_unix}"

If I put something infront of "time" it is outputted correctly with the text in front. If I use str_replace to try to format it the way I want it reverts to the same issue.
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

&times is the character entity for the little X multiplication sign.  It's working correctly.  Please look at it in the browser's "view source" window and tell us what you see, thanks.
Avatar of Robert Saylor

ASKER

how can I make "&times" display "&times" instead of "x" ?

I understand the issue now. ASCII ugg
ASKER CERTIFIED SOLUTION
Avatar of Ray Paseur
Ray Paseur
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I will just wrap it in a text box. Was building a configuration system for one of our advertising systems. You identified the ASCII value and that is what was going on. I completely forgot about those. Sadly I thought the ASCII value had to end with the ; but I guess not.
FYI the wrapper did not work. The & solution did the trick.