# \[Solved\] Require file causing stray one

**URL:** <https://discourse.cakephp.org/t/solved-require-file-causing-stray-one/3314>\
**Category:** Uncategorized\
**Created:** [October 7, 2017, 1:50am UTC](https://discourse.cakephp.org/t/solved-require-file-causing-stray-one/3314 "2017-10-07T01:50:43Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimgwhit](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jimgwhit/32/378_2.png) [@jimgwhit](https://discourse.cakephp.org/u/jimgwhit)\
**Post date:** [October 7, 2017, 1:50am UTC](https://discourse.cakephp.org/t/solved-require-file-causing-stray-one/3314/1 "2017-10-07T01:50:43Z")

</div>

I am including some content in a layout:

```auto
    <?php echo require APP . 'Template/Layout/mytest' . '.ctp'; ?>

```

The content is displayed, but causing a stray 1 (one) right after the content.  
No stray 1 anywhere if I delete that line. Here is the content, just a test now:

```auto
<div> Jimmie it worked</div>

```

---

<div class="post-metadata">

**Author:** ![raul338](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/raul338/32/69_2.png) [@raul338](https://discourse.cakephp.org/u/raul338)\
**Post date:** [October 7, 2017, 2:19am UTC](https://discourse.cakephp.org/t/solved-require-file-causing-stray-one/3314/2 "2017-10-07T02:19:07Z")

</div>

A couple of things

- You should [elements](https://book.cakephp.org/3.0/en/views.html#elements)
- In the event that you’re not using CakePHP, you only use require, since echo is treating require as an argument (and show “1” every time you use it
- a simple shorthand to echo things is `<?= "a" ?>`

---

<div class="post-metadata">

**Author:** ![jimgwhit](https://yyz1.discourse-cdn.com/flex029/user_avatar/discourse.cakephp.org/jimgwhit/32/378_2.png) [@jimgwhit](https://discourse.cakephp.org/u/jimgwhit)\
**Post date:** [October 7, 2017, 2:34am UTC](https://discourse.cakephp.org/t/solved-require-file-causing-stray-one/3314/3 "2017-10-07T02:34:00Z")

</div>

OK i missed that it goes in Element, I figured Layout, all working, thanks. I guess each framework has their own little thing.

```auto
<?php echo $this->element('mytest'); ?>

```

works, thanks so much.
