Question marks in comment fields

The place for "I can't figure out how to..." questions.
Post Reply
a27x64sy
User
Posts: 2
Joined: Sat Apr 21, 2007 11:28 pm

Question marks in comment fields

Post by a27x64sy » Sat Apr 21, 2007 11:38 pm

Every comment field has a question mark at the end and I can't remove them with str_replace() or preg_replace()! Any ideas?

Code: Select all

...
            [comments] => Array
                (
                    [title] => Array
                        (
                            [0] => Afternoon Speaker�
                        )

                    [artist] => Array
                        (
                            [0] => The Sea And Cake�
                        )

                    [composer] => Array
                        (
                            [0] => Eric Claridge-John McEntire-Sam Prekop-Archer Prewitt�
                        )

                    [album] => Array
                        (
                            [0] => Oui�
                        )

                    [track_number] => Array
                        (
                            [0] => 1/10�
                        )

                    [part_of_a_set] => Array
                        (
                            [0] => 1/1�
                        )

                    [year] => Array
                        (
                            [0] => 2000�
                        )

                    [bpm] => Array
                        (
                            [0] => 192�
                        )

                    [content_type] => Array
                        (
                            [0] => Alternative & Punk�
                        )
...

Allan Hansen
getID3() v2 developer
Posts: 445
Joined: Sun May 04, 2003 2:22 pm
Location: Holmegaard, Denmark

Post by Allan Hansen » Sun Apr 22, 2007 7:43 am

for ($i=0; $i<strlen($string['comments']['title'][0]); $i++) {
print $string['comments']['title'][0] . ' ' . chr($string['comments']['title'][0]) . '<br>';
}

Might not be questionmarks afterall.

a27x64sy
User
Posts: 2
Joined: Sat Apr 21, 2007 11:28 pm

Post by a27x64sy » Fri Apr 27, 2007 11:39 pm

Thanks for the response Allan. It was a null character (ascii 0). rtrim() removes it.

Post Reply