help. manual says:

$hello  = "Hello World"
$trimmed = trim($hello, "Hdle");
var_dump($trimmed);

when used turned out to be:

string(5) "o Wor"

i just want to remove all the x's from my string. its not working for me.
$string = "faxtxxx";
does not come out to be "fat"
it comes out to be "faxtxxx" when i do
$string = trim($string, "x");

help

You could always try str_replace.
E.g.

$str_word = 'fooxxbarrxx';
echo str_replace('x', '', $str_word);
// foobar

R

thanks man u helped a lot. im pretty sure this is what ivve been looking for.. thanks again

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.