Re: Question using chop :-)
| From: | Yasuo Ohgaki | Date: | Sun, 01 Apr 2001 01:57:47 +0000 |
| Subject: | Re: Question using chop :-) | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46480@lists.php.net to get a copy of this message | ||
It's not explain why you get additional char at the end of string, but chop() in
PHP does not get rid of last char, but it also suppose to get rid of spaces
including newline.
What char code are you using? Char code may be the cause.
--
Yasuo Ohgaki
""Marcus Ouimet"" <marcus@webpagescanada.com> wrote in message
news:JJEGIGECCMOOOJOHHBENGEICDAAA.marcus@webpagescanada.com...
> I have got chop to work for me to remove characters at the end of the
> string using something like:
>
> echo $listing_values1 = chop(substr($listing_values['name'],0,4);
> echo $listing_values1 ['name'] . '...' . ' ' .
> "\n";
>
> Works great except for the fact after the name there appears to be a letter
> ie:
>
> Brita Water Filter
>
> Would become:
>
> BritaB...
>
> The letter is different for each entry. What am I oing wrong. Any help
> appreciated thanks in advance...
>
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>