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

2012-12-21 Thread Jim Giner
On 12/21/2012 7:59 PM, Nathan Nobbe wrote: On Fri, Dec 21, 2012 at 4:10 PM, Nathan Nobbe wrote: On Fri, Dec 21, 2012 at 3:27 PM, Jim Giner wrote: On 12/21/2012 5:16 PM, Tedd Sperling wrote: On Dec 21, 2012, at 4:58 PM, Jim Giner wrote: Never realized that you could address a string

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

2012-12-21 Thread Nathan Nobbe
On Fri, Dec 21, 2012 at 4:10 PM, Nathan Nobbe wrote: > > > On Fri, Dec 21, 2012 at 3:27 PM, Jim Giner > wrote: > >> On 12/21/2012 5:16 PM, Tedd Sperling wrote: >> >>> On Dec 21, 2012, at 4:58 PM, Jim Giner >>> wrote: >>> > Never realized that you could address a string as an array of c

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

2012-12-21 Thread Bastien
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 >{ >$tmp[] = $row['categ

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

2012-12-21 Thread Louis Colman
Think that PHP inherited this from the C-language. The C-language inherited this from good old assembler :-) Index of the array is the offset from the starting-address of the string. Suppose the "$a" starts at address 1000 than $a[0] is at 1000 + 0, $a[1] is at 1000 + 1 $a[2] is at 1000 + 2 etc..

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

2012-12-21 Thread Jim Giner
On 12/21/2012 6:10 PM, Nathan Nobbe wrote: On Fri, Dec 21, 2012 at 3:27 PM, Jim Giner wrote: Neat idea Tedd, but judging by a quick test, I don't think changing the value of the string is entirely supported though that notation. php > $str = 'blah'; php > $str[3] = ''; php > echo $str . PHP_

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

2012-12-21 Thread Nathan Nobbe
On Fri, Dec 21, 2012 at 3:27 PM, Jim Giner wrote: > On 12/21/2012 5:16 PM, Tedd Sperling wrote: > >> On Dec 21, 2012, at 4:58 PM, Jim Giner >> wrote: >> >>> Never realized that you could address a string as an array of chars, >>> which you are doing. Could that be the issue? Or did I lear

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

2012-12-21 Thread Jim Giner
On 12/21/2012 5:16 PM, Tedd Sperling wrote: On Dec 21, 2012, at 4:58 PM, Jim Giner wrote: Never realized that you could address a string as an array of chars, which you are doing. Could that be the issue? Or did I learn something new? Or should you have used substr to remove that last ch

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

2012-12-21 Thread Ken Robinson
Can you post the javascript that's causing the problem? And, yes, it's IE, what did you expect... :-) Ken At 05:10 PM 12/21/2012, Tedd Sperling wrote: On Dec 21, 2012, 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

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

2012-12-21 Thread Tedd Sperling
On Dec 21, 2012, at 4:58 PM, Jim Giner wrote: >> > Never realized that you could address a string as an array of chars, which > you are doing. Could that be the issue? Or did I learn something new? Or > should you have used substr to remove that last char? Jim: I guess you learned somethin

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

2012-12-21 Thread Tedd Sperling
On Dec 21, 2012, 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 >{ >$tmp[] = $row['catego

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

2012-12-21 Thread Ken Robinson
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 { $tmp[] = $row['category']; } $topic = explode('~',$t

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

2012-12-21 Thread Jim Giner
On 12/21/2012 4:38 PM, Tedd Sperling wrote: Hi gang; I just ran into something I have never had a problem with before. Here's the code: --- start of code $topic = ''; while($row = mysql_fetch_array($result)) // pulling stuff from a database {

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

2012-12-21 Thread Tedd Sperling
Hi gang; I just ran into something I have never had a problem with before. Here's the code: --- start of code $topic = ''; while($row = mysql_fetch_array($result)) // pulling stuff from a database { $topic .= $row['category'] . '~'; // add

Re: [PHP] Sorry bout that...

2012-12-21 Thread Tedd Sperling
On Dec 21, 2012, at 11:39 AM, Steven Staples wrote: >> You couldn't prove that by me -- I'll ask my wife. She knows everything. >> >> Cheers, >> >> tedd > > And this will be the last we hear of Tedd... LOL Well... she did say "Don't worry about -- go shopping." So, I'll be leaving now. Chee

RE: [PHP] Sorry bout that...

2012-12-21 Thread Steven Staples
> You couldn't prove that by me -- I'll ask my wife. She knows everything. > > Cheers, > > tedd And this will be the last we hear of Tedd... LOL -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Sorry bout that...

2012-12-21 Thread Tedd Sperling
On Dec 21, 2012, at 8:22 AM, Steven Staples wrote: > I would like to let everyone know that the world didn't end this morning > like it was supposed too. It didn't! You couldn't prove that by me -- I'll ask my wife. She knows everything. Cheers, tedd _ t...@sperling.com h

Re: [PHP] Sorry bout that...

2012-12-21 Thread Camilo Sperberg
On 21 dec. 2012, at 14:22, "Steven Staples" wrote: > I would like to let everyone know that the world didn't end this morning > like it was supposed too. > > > > Sorry, carry on about your business. > > > > And HAPPY FRIDAY!!! > > > > Steven Staples > lol xD Latest news says it will

Re: [PHP] Sorry bout that...

2012-12-21 Thread Fatih P.
yah. we were just talking about that here too. On Fri, Dec 21, 2012 at 8:22 AM, Steven Staples wrote: > I would like to let everyone know that the world didn't end this morning > like it was supposed too. > > > > Sorry, carry on about your business. > > > > And HAPPY FRIDAY!!! > > > > Steven Sta

[PHP] Sorry bout that...

2012-12-21 Thread Steven Staples
I would like to let everyone know that the world didn't end this morning like it was supposed too. Sorry, carry on about your business. And HAPPY FRIDAY!!! Steven Staples