str_pad($myString, 100 ,'.',STR_PAD_RIGHT);
Should work for you.
It will fill the string with dots. till the length is 100
سؤال
im making a posting script little like twitter
how ever im making the posting text to be 100 Characters only.
now i wanna make something like when user write about 50 Characters there will be another 50 Characters empty
i want a php method to fill the rest of the text with dots (.)
like this
the user post is:
hello my name is Youssef Subehi
in database i want it to be :
hello my name is Youssef Subehi ...... dots to be 100 Characters
Thanks in Advance.
المحلول
str_pad($myString, 100 ,'.',STR_PAD_RIGHT);
Should work for you.
It will fill the string with dots. till the length is 100