89c55 Posted October 6, 2011 Share Posted October 6, 2011 The below might be a noob question but, I concatenate two spaces in the below string $new_hebrew_date_string = $hebrewMonthName . ' ' . $hebrewDay . "%"; yet when I execute echo "<br />new_hebrew_date_string is $new_hebrew_date_string<br />"; printf("hebrew_date_string is: %s <br />", $new_hebrew_date_string); Only one space is output in between $hebrewMonthName and $hebrewDay regardless of how many spaces I pad the string with. Strangely enough, the string $new_hebrew_date_string is correctly padded w/spaces when I pass it as a parameter to a mySQL stored procedure. Any ideas anyone? Thank you. Quote Link to comment https://forums.phpfreaks.com/topic/248578-concatenating-multiple-spaces-into-string-that-dont-display-wecho-or/ Share on other sites More sharing options...
requinix Posted October 6, 2011 Share Posted October 6, 2011 HTML collapses multiple whitespaces characters into a single space. Use CSS to format stuff the way you want. If you actually need two spaces then use two s instead. Quote Link to comment https://forums.phpfreaks.com/topic/248578-concatenating-multiple-spaces-into-string-that-dont-display-wecho-or/#findComment-1276582 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.