PHP Assignment Operators Baffled

Posted 395 days ago and modified 308 days ago
Filed Under:

“The basic assignment operator is “=”. Your first inclination might be to think of this as “equal to”. Don’t. It really means that the left operand gets set to the value of the expression on the right (that is, “gets set to”).” – Via

Found this (practical) run down on Assignment Operators of PHP more helpful then this one.

Filed Under:
Comment · Tweet!

Escape Textile

Posted 425 days ago and modified 128 days ago
Filed Under: , ,

<txp:php>echo date('F Y'); </txp:php> produces the following error when posted to the <txp:body /> of an article:

error: Parse error: syntax error, unexpected $end, expecting T_STRING or T_VARIABLE or '$' in /var/www/sitepath/textpattern/publish/taghandlers.php(3089) : eval()'d code on line 1

As noted here, escaping textile does render the PHP correctly. Escaping in textile is done as follows by wrapping with double equal signs.

==<txp:php>echo date('F Y'); </txp:php>==

And, thereby PHP does echo the date as shown here: Today is September 09, 2010

Now on to establishing a 1000 beat per day format for <txp:posted />

Filed Under: , ,
Comment · Tweet!
 
Trusted Payments
Send a text to 646.836.9557 (VENMO):
Pay whaleen