# Php & p5.js problem

**URL:** <https://discourse.processing.org/t/php-p5-js-problem/7947>\
**Category:** Coding Questions\
**Created:** [January 29, 2019, 8:28pm UTC](https://discourse.processing.org/t/php-p5-js-problem/7947 "2019-01-29T20:28:05Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bossman](https://avatars.discourse-cdn.com/v4/letter/b/bc8723/32.png) [@bossman](https://discourse.processing.org/u/bossman)\
**Post date:** [January 29, 2019, 8:28pm UTC](https://discourse.processing.org/t/php-p5-js-problem/7947/1 "2019-01-29T20:28:05Z")

</div>

i work on wordpress plugin and p5.js. But i don’t combine php and p5.js . My example codes is under the text.Please help me !

```auto
<?php
function information_Collect(){
?>
            <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/p5.js/0.7.3/p5.js">
            function setup() {
              }
              function draw() {
                ellipse(50, 50, 80, 80);
              }
            </script>
            <?php
    }
    add_shortcode('example','information_Collect');
?>

```

---

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [January 29, 2019, 9:27pm UTC](https://discourse.processing.org/t/php-p5-js-problem/7947/2 "2019-01-29T21:27:22Z")

</div>

AFAIK, `<script>` tags w/ attribute _src_ can’t have JS code embedded inside them. 🙄

> **[\<script\>: The Script element](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/script#attr-src)**
>
> The HTML script element is used to embed or reference executable code; this is typically used to embed or refer to JavaScript code.
