Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Is it possible to assign a php variable to javascript ? And
also is it possible to fetch the page contents if the url
is not under our control ?

Answer Posted / gagan rana

Yes ,it is possible by doing like the following:

<?php

$x = 'hai!';

echo "<script>var x = '" . $x . "';</script>";

?>

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

Name the types of functions.

893


What are the data types in js?

909


What percentage of websites use javascript?

867


Where can I learn javascript?

914


What is stack queue?

857


Difference between window.onload and onDocumentReady?

906


Can you assign a anonymous function to a variable?

881


How compare function works javascript?

796


What is use of settimeout function in javascript?

1006


What is a name function in javascript & how to define it?

874


List out the different ways an HTML element can be accessed in a Javascript code?

1163


Auto insurance project..How to explain project in interviews.Using Automation tool (selenium).

1805


How do I view javascript in chrome?

831


Is client side front end?

827


Can we learn javascript without knowing java?

925