• Categories
    • PHP
    • phpMyAdmin
    • PHPMailer
    • FFMpeg
    • PHPEXcel
    • PHPDoc
    • PHPUnit
    • CakePHP
    • CakePHP 2.0
    • Cake PHP 2.1
    • CakePHP Model
    • Facebook PHP SDK
    • composer-php
    • PHP 7
    • PHP GD
    All Categories
  • About

What is the difference between client-side and server-side programming?

javascriptphpclient-sideserver-side


PHP Snippet 1:

<script type="text/javascript">
    var foo = 'bar';
    <?php
        file_put_contents('foo.txt', ' + foo + ');
    ?>

    var baz = <?php echo 42; ?>;
    alert(baz);
</script>

PHP Snippet 2:

<script type="text/javascript">
    var foo = 'bar';

    var baz = 42;
    alert(baz);
</script>

Related Snippets

selected value from the listbox in php

AJAX call fails with SyntaxError: Unexpected end of JSON input

Select option from dropdown menu with PHP and mySql

how to youtube api data to print in toolset metabox using a button click before save-post

How to generate QR CODE for dynamic generating link and logo using Simple QrCode in laravel?

How to get unique slug to same post-title for other time too?

Add a text next to stock quantity if it is less than 10 in Woocommerce single product

possible options to create pdf file using html elements to generate invoice in php and codeigniter

How to get variable from JavaScript to PHP [duplicate]

How to change HTML structure inside WP <head>

PHP random string generator

using random function but it's displaying duplicates

Having issue with matching rows in the database using PDO

Do I need to install `fxp/composer-asset-plugin` if I'm not doing front-end development

How can I make this nested location configuration use the correct path to call a php program?

About Contact Privacy policy Terms and conditions