Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Stefan Wixfort
On 22.12.2012 00:31, Bastien wrote: On 2012-12-21, at 5:05 PM, Ken Robinson wrote: A much easier way to do this would be to use a temporary array and then explode: $tmp = array(); while($row = mysql_fetch_array($result)) // pulling stuff from a database {

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Bastien
Bastien Koert On 2012-12-22, at 11:50 AM, Tedd Sperling wrote: > On Dec 22, 2012, at 7:58 AM, tamouse mailing lists > wrote: > >> A bit of an example to shed a little light? >> -snip- >> Not knowing IE really at all, nor it's JS engine, it's entirely >> possible that a null character in a s

[PHP] Re: Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tim Streater
On 22 Dec 2012 at 16:50, Tedd Sperling wrote: > On Dec 21, 2012, at 8:06 PM, Jim Giner wrote: >>> That actually makes sense tho. Afterall, a string is truly only one memory >>> allocation whereas array elements are basically multiple vars having the >>> same name. So - how can you unset one c

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tedd Sperling
On Dec 22, 2012, at 7:58 AM, tamouse mailing lists wrote: > A bit of an example to shed a little light? > -snip- > Not knowing IE really at all, nor it's JS engine, it's entirely > possible that a null character in a string causes it to have problems. That's the explanation I was looking for --

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tedd Sperling
On Dec 21, 2012, at 8:06 PM, Jim Giner wrote: >> That actually makes sense tho. Afterall, a string is truly only one memory >> allocation whereas array elements are basically multiple vars having the >> same name. So - how can you unset one char in a string? It depends upon the language -- wh

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tedd Sperling
On Dec 21, 2012, at 5:27 PM, Jim Giner wrote: > From what I do know, there shouldn't be an a[4]. > In any case, let's assume that there is a bug in the string logic that you're > using. Why not just use substr? > > $topic = substr($topic,0,-1); and On Dec 21, 2012, at 6:10 PM, Nathan Nobbe w

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Jim Giner
On 12/22/2012 11:29 AM, Tedd Sperling wrote: On Dec 21, 2012, at 5:20 PM, Volmar Machado wrote: What is the result in FF? And on IE? (the echoed string) That's the problem, it's different. If the last char in a string is set to null, then it causes JavaScript routines running under IE to b

[PHP] A Recent Emacs Mode for PHP

2012-12-22 Thread Eric James Michael Ritz
Hello everyone, I do not know how many PHP developers use GNU Emacs for writing code. But I assume it must be a decent amount since there are multiple PHP modes for Emacs floating around the Internet. For months I have worked to improve one of those modes, what seemed to be the most popular: htt

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread Tedd Sperling
On Dec 21, 2012, at 5:20 PM, Volmar Machado wrote: > What is the result in FF? And on IE? (the echoed string) That's the problem, it's different. If the last char in a string is set to null, then it causes JavaScript routines running under IE to behave differently than the exact same JavaScrip

Re: [PHP] Strange string stuff -- maybe everything is ending...

2012-12-22 Thread tamouse mailing lists
On Fri, Dec 21, 2012 at 7:06 PM, Jim Giner wrote: > That actually makes sense tho. Afterall, a string is truly only one memory > allocation whereas array elements are basically multiple vars having the > same name. So - how can you unset one char in a string? That actually depends on what you m