Skip to content

Commit 6bc091b

Browse files
user sort tags and remove semicolon
1 parent e730077 commit 6bc091b

File tree

5 files changed

+19
-19
lines changed

5 files changed

+19
-19
lines changed

user_guide_src/source/general/helpers.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ use, you'll call it the way you would a standard PHP function.
9292
For example, to create a link using the ``anchor()`` function in one of
9393
your view files you would do this::
9494

95-
<?php echo anchor('blog/comments', 'Click Here');?>
95+
<?= anchor('blog/comments', 'Click Here') ?>
9696

9797
Where "Click Here" is the name of the link, and "blog/comments" is the
9898
URI to the controller/method you wish to link to.

user_guide_src/source/helpers/form_helper.rst

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -31,13 +31,13 @@ Consider the following example::
3131

3232
$string = 'Here is a string containing "quoted" text.';
3333

34-
<input type="text" name="myfield" value="<?= $string; ?>" />
34+
<input type="text" name="myfield" value="<?= $string ?>" />
3535

3636
Since the above string contains a set of quotes, it will cause the form
3737
to break. The :php:func:`esc()` function converts HTML special
3838
characters so that it can be used safely::
3939

40-
<input type="text" name="myfield" value="<?= esc($string); ?>" />
40+
<input type="text" name="myfield" value="<?= esc($string) ?>" />
4141

4242
.. note:: If you use any of the form helper functions listed on this page,
4343
and you pass values as an associative array,
@@ -619,7 +619,7 @@ The following functions are available:
619619

620620
Example::
621621

622-
<input type="text" name="quantity" value="<?php echo set_value('quantity', '0'); ?>" size="50" />
622+
<input type="text" name="quantity" value="<?= set_value('quantity', '0') ?>" size="50" />
623623

624624
The above form will show "0" when loaded for the first time.
625625

@@ -641,9 +641,9 @@ The following functions are available:
641641
Example::
642642

643643
<select name="myselect">
644-
<option value="one" <?php echo set_select('myselect', 'one', TRUE); ?> >One</option>
645-
<option value="two" <?php echo set_select('myselect', 'two'); ?> >Two</option>
646-
<option value="three" <?php echo set_select('myselect', 'three'); ?> >Three</option>
644+
<option value="one" <?= set_select('myselect', 'one', TRUE) ?>>One</option>
645+
<option value="two" <?= set_select('myselect', 'two') ?>>Two</option>
646+
<option value="three" <?= set_select('myselect', 'three') ?>>Three</option>
647647
</select>
648648

649649
.. php:function:: set_checkbox($field[, $value = ''[, $default = FALSE]])
@@ -662,8 +662,8 @@ The following functions are available:
662662

663663
Example::
664664

665-
<input type="checkbox" name="mycheck" value="1" <?php echo set_checkbox('mycheck', '1'); ?> />
666-
<input type="checkbox" name="mycheck" value="2" <?php echo set_checkbox('mycheck', '2'); ?> />
665+
<input type="checkbox" name="mycheck" value="1" <?= set_checkbox('mycheck', '1') ?> />
666+
<input type="checkbox" name="mycheck" value="2" <?= set_checkbox('mycheck', '2') ?> />
667667

668668
.. php:function:: set_radio($field[, $value = ''[, $default = FALSE]])
669669
@@ -678,8 +678,8 @@ The following functions are available:
678678

679679
Example::
680680

681-
<input type="radio" name="myradio" value="1" <?php echo set_radio('myradio', '1', TRUE); ?> />
682-
<input type="radio" name="myradio" value="2" <?php echo set_radio('myradio', '2'); ?> />
681+
<input type="radio" name="myradio" value="1" <?= set_radio('myradio', '1', TRUE) ?> />
682+
<input type="radio" name="myradio" value="2" <?= set_radio('myradio', '2') ?> />
683683

684684
.. note:: If you are using the Form Validation class, you must always specify
685685
a rule for your field, even if empty, in order for the ``set_*()``

user_guide_src/source/tutorial/create_news_items.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ the slug from our title in the model. Create a new view at
1717

1818
::
1919

20-
<h2><?= esc($title); ?></h2>
20+
<h2><?= esc($title) ?></h2>
2121

2222
<?= \Config\Services::validation()->listErrors(); ?>
2323

user_guide_src/source/tutorial/news_section.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -197,18 +197,18 @@ and add the next piece of code.
197197

198198
::
199199

200-
<h2><?= esc($title); ?></h2>
200+
<h2><?= esc($title) ?></h2>
201201

202202
<?php if (! empty($news) && is_array($news)) : ?>
203203

204204
<?php foreach ($news as $news_item): ?>
205205

206-
<h3><?= esc($news_item['title']); ?></h3>
206+
<h3><?= esc($news_item['title']) ?></h3>
207207

208208
<div class="main">
209-
<?= esc($news_item['body']); ?>
209+
<?= esc($news_item['body']) ?>
210210
</div>
211-
<p><a href="/news/<?= esc($news_item['slug'], 'url'); ?>">View article</a></p>
211+
<p><a href="/news/<?= esc($news_item['slug'], 'url') ?>">View article</a></p>
212212

213213
<?php endforeach; ?>
214214

@@ -264,8 +264,8 @@ The only thing left to do is create the corresponding view at
264264

265265
::
266266

267-
<h2><?= esc($news['title']); ?></h2>
268-
<p><?= esc($news['body']); ?></p>
267+
<h2><?= esc($news['title']) ?></h2>
268+
<p><?= esc($news['body']) ?></p>
269269

270270
Routing
271271
-------------------------------------------------------

user_guide_src/source/tutorial/static_pages.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ the following code:
8181
</head>
8282
<body>
8383

84-
<h1><?= esc($title); ?></h1>
84+
<h1><?= esc($title) ?></h1>
8585

8686
The header contains the basic HTML code that you'll want to display
8787
before loading the main view, together with a heading. It will also

0 commit comments

Comments
 (0)