Re: Strange string stuff -- maybe everything is ending...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Dec 21, 2012, at 5:27 PM, Jim Giner <jim.giner@xxxxxxxxxxxxxxxxxx> 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 <quickshiftin@xxxxxxxxx> 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_EOL;
> bla
> php > echo strlen($str);
> 4


I'm not looking for a solution, but rather pointing out something I never encountered before.

I would have never thought that a string echoed by a PHP script to be used in a JavaScript routine would depend upon what Browser it is run on. That seems odd.

Cheers,

tedd


_____________________
tedd@xxxxxxxxxxxx
http://sperling.com




-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php




[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux