/    Sign up×
Community /Pin to ProfileBookmark

important question, please help me

Hello,
I would like to add a futher to my site and forum
whenever someone posts a post in either my site or forum
if the messege is to long it’s making the current row of the table where the post is longger then it’s original size.
I would like to do that if the messege is longger then suites in the table it’s just brakes a line.
For exemple:
aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa

The following text didn’t made the table or the page to be longger.
give me a way to do it let’s say with the var $Post
that contains the post that is going to the db
Thank you,
Shaul.

to post a comment
PHP

7 Comments(s)

Copy linkTweet thisAlerts:
@NogDogApr 03.2007 — Use [url=http://www.php.net/wordwrap]wordwrap[/url] with the 4th parameter:
[code=php]
$maxCharPerLine = 30;
echo wordwrap($text, $maxCharPerLine, ' ', 1);
[/code]
Copy linkTweet thisAlerts:
@shaullxauthorApr 03.2007 — thanks!

can you please explain?
Copy linkTweet thisAlerts:
@NogDogApr 03.2007 — thanks!

can you please explain?[/QUOTE]

It's all explained here: [url=http://www.php.net/wordwrap]wordwrap[/url]. If there's something there you don't understand, let us know.
Copy linkTweet thisAlerts:
@shaullxauthorApr 03.2007 — It's all explained here: [url=http://www.php.net/wordwrap]wordwrap[/url]. If there's something there you don't understand, let us know.[/QUOTE]
thanks alot. ?
Copy linkTweet thisAlerts:
@shaullxauthorApr 03.2007 — wordwrap doesn't work for me if there is only one word with lot's of char in it
Copy linkTweet thisAlerts:
@TaschenApr 04.2007 — wordwrap doesn't work for me if there is only one word with lot's of char in it[/QUOTE]
Did you add the "1" as in NogDog's example? The 1 acts as a flag to tell php to wrap non-breaking strings (strings with no spaces).
Copy linkTweet thisAlerts:
@shaullxauthorApr 04.2007 — Did you add the "1" as in NogDog's example? The 1 acts as a flag to tell php to wrap non-breaking strings (strings with no spaces).[/QUOTE]
Thanks ?

now it's ok.
×

Success!

Help @shaullx spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...