tiny problem with post_content & php (how to remove \n )
-
hi,
I want to show a post_custom field data into a float ‘div’ using javascript by the method ‘ShowMsg’ so I write:
onmousemove="ShowTooltip('<?php echo str_replace("\n","<br />",htmlspecialchars(post_custom('tooltip'))) ?>')"
but there still be a line that break the text… so it look like…
onmousemove="ShowTooltip('hi, how are you')"
the text shown in 2 lines so JavaScript got an error…
for more info the main text is always written in utf-8 arabic…can you help me solving the problem…
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘tiny problem with post_content & php (how to remove \n )’ is closed to new replies.