| | |
Php Spacing
Please support our PHP advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
I think is problem may be more connected to HTML rather then php.
The issue I have is that I have a my sql db and in one of the colume in which there is a string like:
but when I extract the variable all I see is :
I also tried to use the "htmlspecialchars" command but it wont do anything so if you have any suggestions how the problem may be fixed please post.
The issue I have is that I have a my sql db and in one of the colume in which there is a string like:
PHP Syntax (Toggle Plain Text)
Testing 1 2 3
but when I extract the variable all I see is :
PHP Syntax (Toggle Plain Text)
Testing 1 2 3
Have you tested to see if htmlspecialchars() converts spaces to ?
If it doesn't you can try htmlentities()
It may also be faster to just use a string replace.
[php]$str = str_replace(' ', ' ', $str);[/php]
If it doesn't you can try htmlentities()
It may also be faster to just use a string replace.
[php]$str = str_replace(' ', ' ', $str);[/php]
www.fijiwebdesign.com - web design and development and fun
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
Cpanel Email - Let users Register email accounts on your website upon registration
Ajax Chat - Fully browser based chat!
•
•
Join Date: Jul 2004
Posts: 494
Reputation:
Solved Threads: 21
No problem, it's supposed to work like that ;-)
HTML for whatever reason condenses multiple spaces into one. To get it to keep its spacing (for an ASCII drawing or whatnot) use the < PRE > and < /PRE > tags (no spaces.
HTML for whatever reason condenses multiple spaces into one. To get it to keep its spacing (for an ASCII drawing or whatnot) use the < PRE > and < /PRE > tags (no spaces.
www.uncreativelabs.net
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
Old computers are getting to be a lost art. Here at Uncreative Labs, we still enjoy using the old computers. Sometimes we want to see how far a particular system can go, other times we use a stock system to remind ourselves of what we once had.
![]() |
Similar Threads
- learning php (PHP)
- Opinions? javascript/php/etc and programming standards (JavaScript / DHTML / AJAX)
- Random Spacing? (HTML and CSS)
- PHP Parse error: parse error, unexpected T_STRING (PHP)
- Core PHP Programming to Build Dynamic Websites (PHP)
Other Threads in the PHP Forum
- Previous Thread: Warning: session_start():
- Next Thread: Using PHP to connect to remote MSSQL database
| Thread Tools | Search this Thread |
Tag cloud for PHP
.htaccess 301 access ajax apache api array beginner binary broken cakephp checkbox class cms code compression cron curl database date directory display download dropdown dynamic echo email error file files folder form forms function functions google href htaccess html httppost image include insert integration ip java javascript joomla limit link login loop mail md5 menu methods mlm mod_rewrite multiple mysql oop parse paypal pdf php problem query radio random recursion regex remote script search secure select server sessions sms soap source space speed sql structure syntax system table tutorial update upload url validation validator variable video votedown web xml youtube






