trim not doing its job?

Here is the construction:

echo $alias."<br>";
trim($alias, '/');
echo $alias."<br>";

Outputs:

/user/steps/
/user/steps/

What am I doing wrong? 🙁


Answer 1, authority 100%

$alias = trim($alias, '/');

The function returns a value. $alias is not passed by reference.

Leave a reply

Please enter your comment!
Please enter your name here