Jump to content

Word Spacing in PHP


rasta876

Recommended Posts

See if your database contains any "\n" or "\r" characters.  These are ignored by the browser, but depending on how you're viewing the database will show up correctly (replaced by an html line break) or as a space.

 

echo str_replace(array("\n", "\r"), " ", $database_row['fieldname']);

Link to comment
https://forums.phpfreaks.com/topic/130989-word-spacing-in-php/#findComment-680280
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.