Hello,
I have a string

$string="- [HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall] -
[HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall] For
both cases,look for a value named “InstallLocation” containing the
string “\Hewlett-Packard\\”, either delete or clear this value and";

and i wrote function fro wrapping it as:
`

$test=wordwrap($string,"80","<br>"); echo $test;

`
but it did not gave me output which i was expecting.
it considered the HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall as one word.
How can i solve this one?

by using regexp?
or is there other parameters for this in wordwrap whcih i am missing?

Add the fourth parameter and it will cut the word:

wordwrap($string, "80", "<br>", true);
commented: heh, rep for infinite patience +14
Member Avatar for diafol

or is there other parameters for this in wordwrap which i am missing?

The php manual is your friend. A quick check would have saved you a lot of time methinks.

Thats my bad habit :(
I will keep this in mind from next time :)

Thanksss a lot :)

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.