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 ?



Is it possible to assign a php variable to javascript ? And also is it possible to fetch the page ..

Answer / 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

More JavaScript Interview Questions

What are javascript objects?

0 Answers  


What are the advantages of javascript?

0 Answers  


How javascript sort function works?

0 Answers  


What is the use of blur function in JavaScript?

0 Answers  


What are the data types in js?

0 Answers  


What is "strict mode" and how is it used in JavaScript?

0 Answers  


What are all the types of Pop up boxes available in JavaScript?

0 Answers  


Explain the difference between javascript and an asp script.

0 Answers  


Is array an object javascript?

0 Answers  


How to determine the state of a checkbox using javascript?

0 Answers  


Name some of the built-in methods and the values returned by them.

0 Answers  


What's the Difference Between Class and Prototypal Inheritance?

0 Answers  


Categories