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

How do I turn on javascript on my phone?

0 Answers  


What does "1"+2+4 evaluate to?

10 Answers   Acheron, Satyam,


Which built-in method combines the text of two strings and returns a new string?

0 Answers  


What is difference between javascript and jscript?

0 Answers  


What is emotional closure?

0 Answers  


What causes memory leaks?

0 Answers  


How to add new elements dynamically?

0 Answers  


How do you know if a set of points is a function?

0 Answers  


What is difference between ajax and javascript?

0 Answers  


What is noscript tag?

0 Answers  


Which is best for front end?

0 Answers  


Which is better for or foreach in javascript?

0 Answers  


Categories