This is a discussion on How add white spaces at the end of string within the alt.comp.lang.php forums, part of the PHP Programming Forums category; Hei, someone can help me in this situation : i need produce this output : "[xxx ]" if the string dont ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
Hei,
someone can help me in this situation : i need produce this output : "[xxx ]" if the string dont have 10 characters i want put white space son the right. I implementei this code : $str=str_pad($str,10," "); echo "[$str]"; And i get this : "[xxx]" Help me please Paulito |
|
|||
|
On Jun 9, 9:42 am, Santana <paulito.sant...@gmail.com> wrote:
> Hei, > > someone can help me in this situation : > > i need produce this output : "[xxx ]" > if the string dont have 10 characters i want put white space son the > right. > > I implementei this code : > > $str=str_pad($str,10," "); > echo "[$str]"; > > And i get this : "[xxx]" > > Help me please > > Paulito Please don't cross-post. See thread in comp.lang.php C. |