Raised This Month: $ Target: $400
 0% 

menu with spaces and crooked text


Post New Thread Reply   
 
Thread Tools Display Modes
Author Message
hitD
Junior Member
Join Date: May 2017
Location: Lithuania
Old 01-20-2021 , 05:20   Re: menu with spaces and crooked text
Reply With Quote #1

As you read all line, you also read the new line symbol. So when u do with fgets you need to add one line of code to replace the ^n symbol with empty.
After fgets method add this.
PHP Code:
replace(iNamecharsmax(iName), "^n"""

Last edited by hitD; 01-20-2021 at 05:21. Reason: Edit
hitD is offline
fysiks
Veteran Member
Join Date: Sep 2007
Location: Flatland, USA
Old 01-21-2021 , 00:34   Re: menu with spaces and crooked text
Reply With Quote #2

Quote:
Originally Posted by hitD View Post
As you read all line, you also read the new line symbol. So when u do with fgets you need to add one line of code to replace the ^n symbol with empty.
After fgets method add this.
PHP Code:
replace(iNamecharsmax(iName), "^n"""
I missed that. However, it is better to use trim(iName) trim whitespace.
__________________
fysiks is offline
Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 10:37.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode