This topic is locked
[SOLVED]

Leading spaces missing

4/28/2024 5:35:08 PM
PHPRunner General questions
D
druck281 author

I have a SQL View that generates a heirarchial list of categories for an asset list. The SQL query indents each level and preceds it with '->'. The query result can be seen in the screenshot below from the query page in PHPR. This list is the source for a dropdown list. When I open the dropdown list on the web server, the leading spaces are gone which prevents the levels from indenting properly. Any idea why the results show correctly inside PHPR but the leading spaces get stripped out when viewed online?

img alt

Thanks!

admin 4/29/2024

Web browsers work this way, they will combine multiple spaces into a single one. If you want to preserve that space, instead of a space use
 

You can make that replacement either in the database or right in the SQL query.

D
druck281 author 4/29/2024

Thank you for getting back to me. WHatever character you was in your response didn't show in the post.

...Instead of space use __

I did get a chuckle and had to look at it twice to see what I was missing.

Thanks!

admin 4/29/2024

This forum software won't display what I need it to display. In the following code remove the spaces and you will see what I mean. Use one of those to replace a single space character.

& nbsp ;

You can also Google "html non-breaking space" to see what I mean.

D
druck281 author 4/30/2024

Great. Thank you!