just to make things terribly confusing ;)

javascript is actually ecmascript, which can be used anywhere an
implementation of the scripting engine is available.  On the server you can
use spidermonkey (a c++ implementation from mozilla), rhino(a java
implementation also from mozilla), etc.  On the client, all browsers support
javascript, but the client-side javascript is 'enhanced' with additional
apis to manipulate the DOM, use AJAX, etc.

also all browsers (IE6/7 *cough*) make it extra difficult by deviating from
the w3c standard for the enhanced client-side api. libraries like jquery
hide these differences as well as provide elegant patterns that reduce your
general effort to write useful code.

im only saying this because if you are new to web development you may decide
to lower your barrier of entry by learning a single language, javascript,
and using it on both the client and the server.

sorry for the fog, hope the muddy water settles for you soon

thatcher

On Wed, Jun 17, 2009 at 12:49 PM, waseem sabjee <[email protected]>wrote:

> JQuery is a JavaScript Library.
> JavaScript is a form of client side scripting.
>
> PHP is a form of server side scripting.
>
> they are not the same.
>
> JQuery is not a library for PHP, however you can use JQuery and PHP in
> combination.
>
> for example.
> <?php
> // this is a php block of code
> $y = 5;
> $x = 2 * y; // note this is a php variable x
> // we know have to export this to the JavaScript
> ?>
> <script type="text/javascript">
> // this is a JavaScript block of code
> $(function() { // note the dollar sign here is not from PHP
>
> /*
>  we declare a variable in JavaScript
>  the value we are assigning to this variable is from a pre-declared php
> variable
>  then we just alert it to the user
> we are importing the php variable
> */
> var myAnswer = <?php echo $x; ?>;
> alert(myAnswer);
>
> });
> </script>
>
>
> On Wed, Jun 17, 2009 at 6:40 PM, inkexit <[email protected]> wrote:
>
>>
>> Thanks for all your help guys.  A recomendation is import because I'm
>> a complete noob when it comes to web programming.  FWIW, I do have a
>> lot of experince with C++ though.
>>
>> One question.  I thought jQuery was a php library?  One poster here
>> said that jQuery will only run in the client's browser, but another
>> poster said I could use php on the server side to read email.
>> Confused...
>
>
>


-- 
Christopher Thatcher

Reply via email to