Tobias Jung-2 wrote:
Well, they are not only unusually nested... additionally, they are not exactly what you might call "clean code"...
[snip]
I guess they are, but writing your PHP code in a different, cleaner and maybe even a teeny weeny bit faster code solves your problem, too:
<?php $str = array("Foo", "Bar"); echo 'Name: ' . $str[($str[1]) ? 1 : 0]; // will echo "Name: Bar" $insert = mysql_query('INSERT INTO `catalogue` SET `model`="' . $_POST["page_row{$count}_model"] . '", `type`="' . $_POST["page_row{$count}_type"] . '", `updated`=UNIX_TIMESTAMP();'); ?>
Kind regards, Tobias Jung
Thank you :) I understand how to make my code work with TextMate's grammar rules, however I would rather have the grammar rules work for all valid syntax, rather than just "clean" syntax.
Just reporting what I'm finding here, is all; and hoping that TM's grammar can be made more robust in this case.
Cheers, Brian