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

Explain mul function in javascript?

0 Answers  


What is encodeuri() function?

0 Answers  


Is it possible to use javascript to change the meta-tags of the page?

0 Answers  


Explain the different types of pop-up boxes you can create in JavaScript.

0 Answers  


What is lazy loading java?

0 Answers  


What is npm repository?

0 Answers  


What is the prototype object in javascript and how it is used?

0 Answers  


How do you round a value in javascript?

0 Answers  


What is a closure javascript? Explain

0 Answers  


Which built-in method returns the length of the string?

0 Answers  


What is a way to append a value to an array?

5 Answers   Satyam,


Where do I write javascript code?

0 Answers  


Categories