@@ -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
3636Since the above string contains a set of quotes, it will cause the form
3737to break. The :php:func: `esc() ` function converts HTML special
3838characters 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_*() ``
0 commit comments