Question: I have an ajax loaded content where i want to use a php script.
The problem is that the script doesn't work and if i try to `.load` it inside the `ajax` loaded content it gives an error stating `"$ is not defined"`.

Is there a way to load a php script inside a dinamically loaded content?

Thanks

edit: i solved the $ is not defiend thing.
ok, some clarifiations.
These are the steps:
INDEX->menu click->ajax loads html into a div inside INDEX->inside that html i put a .load that should load the output of a php script.
Unfortunately it doesn't work.

edit2: i was just stupid, the php script did load just well, the problem was i missed a character in the password for the db and it didn't load the content. Thanks

Answer: 
> 
> "$ is not defined"
> 
> 
> 

means the jquery library is not loaded check that

you have provided the correct path to the jQuery.js file, also include the jquery before including any other `js` library

try using a [cdn](https://ajax.googleapis.com/ajax/libs/jquery/1.8.1/jquery.min.js) hosted version of jquery

EDIT

when you bind events to the dynamically loaded elements you have to use `.on`(jquery 1.7+) or `.delegate` like 

```
$(document).delegate( "yourElement", "load",
    function(e) {
        alert("loaded");
});

```
No, you cannot load a PHP script and run it in the browser. If you setup your server to run the PHP script, you can load the **output** of the PHP script in your browser using AJAX.