I've been battling with quotes encoding when outputting javascript with php.
It can't be unique, so I'm hoping someone has a working solution they're
willing to share.
The following works perfectly as long as there aren't any single quotes in
the link text:
echo "$sTitle";
if $sTitle has
Arno Kuhl wrote:
>I've been battling with quotes encoding when outputting javascript with
>php.
>It can't be unique, so I'm hoping someone has a working solution
>they're
>willing to share.
>
>The following works perfectly as long as there aren't any single quotes
>in
>the link text:
> ec
From: Ashley Sheridan [mailto:a...@ashleysheridan.co.uk]
Sent: 13 March 2012 03:25 PM
To: a...@dotcontent.net; php-general@lists.php.net
Subject: Re: [PHP] Getting knotted with quotes encoding
Arno Kuhl wrote:
>I've been battling with quotes encoding when outputting javascript with
>php.
>It
On Mar 12, 2012, at 7:12 PM, Tim Streater wrote:
>
> function yes ($a)
> {
> global $x;
> if ($a) $x = "yes\n";
> }
>
> first (true);
>
> echo $x;
>
> ?>
>
>
> but I haven't looked into $GLOBALS enough to know whether using them instead
> would have saved my bacon.
I'm no
I have an issue that occurs randomly on a machine. After a number of reloads
of the page i can't read $this->_foo although it is set (var_dump shows it
but the script cannot read it). The code works locally and on other machines
i tested. Apache restart seems to fix it but only temporary.
Environm
On Mar 12, 2012, at 12:04 PM, Daniel Brown wrote:
> On Sun, Mar 11, 2012 at 14:16, Tedd Sperling wrote:
>> This document clearly states that $GLOBALS is a SuperGlobal -- what am I not
>> understanding here?
>
>You are understanding it correctly, the only thing that's missing
> is the populat
On Tue, Mar 13, 2012 at 4:59 PM, Tedd Sperling wrote:
> On Mar 12, 2012, at 7:12 PM, Tim Streater wrote:
>> >
>> function yes ($a)
>> {
>> global $x;
>> if ($a) $x = "yes\n";
>> }
>>
>> first (true);
>>
>> echo $x;
>>
>> ?>
>>
>>
>> but I haven't looked into $GLOBALS enough to kn
On 13 Mar 2012, at 15:59, Tedd Sperling wrote:
> In any event, I seldom use globals anyway. This was more an academic
> discussion.
If you're being academic about it please remember that the way PHP defines
globals is different to most other languages.
PHP: A variable defined at the top-level
On Mar 13, 2012, at 12:20 PM, Stuart Dallas wrote:
> On 13 Mar 2012, at 15:59, Tedd Sperling wrote:
>
>> In any event, I seldom use globals anyway. This was more an academic
>> discussion.
> -snip-
> It ultimately also means that only the superglobals are true globals.
That was my initial statem
On 13 Mar 2012 at 15:59, Tedd Sperling wrote:
> I'm not sure what would have saved bacon in the above case. I don't see how
> your example would work. I think it contained a typo.
>
> In what I think you were trying to demonstrate, I would just pass $x by
> reference (&$x) -- or -- return $x by
Sorry wasn't able to reproduce it on my test machine.
Do you have any external modules loaded such as APC, memcached, xDebug maybe or
other that can affect the output on that machine?
Greetings
On 13 Mar 2012, at 17:02, Adrian Basalic wrote:
> I have an issue that occurs randomly on a machine
I am implementing a custom error handler and started noticing some bizarre
behavior. Every Nth time I refresh the page, I see the error/output.
In my 'includes/common.inc.php' the key things are these:
set_error_handler('php_error_handler');
function php_error_handler($errno, $er
Stuart Dallas wrote:
[snip] so $GLOBALS['GLOBALS']['GLOBALS']['GLOBALS']['_SERVER'] is a perfectly
valid, if daft, way of accessing $_SERVER.
-Stuart
Now this is becoming educational! ;-)
Donovan
--
D Brooke
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http:/
13 matches
Mail list logo