I need help, is there a way of writing this code without getting errors.thanks

This code looks fine to me but why i’m getting errors. please need help.thanks

[php]

<?php public function f_misc_deldelimiter( &$Txt, $Delim ) { $len = strlen( $Txt ); if ( 1 < $len && $Txt[0] === $Delim ) { if ( $Txt[$len - 1] === $Delim ) { $Txt = substr( $Txt, 1, $len - 2 ); } return false; } return true; } ?>

[/php]

Why the & in front of $Txt?

Hi mrema,

Is this part of a class? If not, the public will throw an error and should be removed.

If it is part of a class, we would probably need to see the class and an example of how your are trying to use the function.

Hi malasho, yes its part of a class, you can see the full code at

http://justa5er.com/help.php

the code is too big to up it here.just copy it.

Sponsor our Newsletter | Privacy Policy | Terms of Service