mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
[ticket/10855] Added array trailing commas info in js to guidelines.
PHPBB3-10855
This commit is contained in:
parent
3978e2620e
commit
ee2e2cb2c3
1 changed files with 1 additions and 1 deletions
|
@ -526,7 +526,7 @@ $post_url = "{$phpbb_root_path}posting.$phpEx?mode=$mode&start=$start";
|
|||
<p>In SQL statements mixing single and double quotes is partly allowed (following the guidelines listed here about SQL formatting), else one should try to only use one method - mostly single quotes.</p>
|
||||
|
||||
<h4>Commas after every array element:</h4>
|
||||
<p>If an array is defined with each element on its own line, you still have to modify the previous line to add a comma when appending a new element. PHP allows for trailing (useless) commas in array definitions. These should always be used so each element including the comma can be appended with a single line</p>
|
||||
<p>If an array is defined with each element on its own line, you still have to modify the previous line to add a comma when appending a new element. PHP allows for trailing (useless) commas in array definitions. These should always be used so each element including the comma can be appended with a single line. In JavaScript, you should not use the trailing comma, as IE doesn't like it.</p>
|
||||
|
||||
<p class="bad">// wrong</p>
|
||||
<div class="codebox"><pre>
|
||||
|
|
Loading…
Add table
Reference in a new issue