php - Is there a way that I can use sprintf() to limit a line/field size? -
I wrote a bit of the following code and if there is a way so that it does not do that I have to Could have limited line of line overflow and wrap in a new line.
"Category product selected" echo "\ N"; Echo "------------------------------------------------ ------------------------- \ n "". "; Forex currency ($ category_page $ key = & gt; $ value) {echo sprintf ("% 8s% s", $ key, $ value) "\ N"; }
Keep in mind that this is a plain text formatting for e-mail / file in bears.
Thanks Dagon.
"Category product selected" echo "\ N"; Echo "------------------------------------------------ -------------------------------- \ n "". "; Forex currency ($ category_list $ key = & gt; $ value) {$ wrap_value = wordwrap ($ value, 60, "\ n", TRUE); Echo Sprint ("% 8s% s", $ K, $ Work_Value) "\ N"; }
I did not know how to add it as an empty space, so I just added it to the new line.
Sample Output:
Comments
Post a Comment