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 the different ways to create an array in javascript?

0 Answers  


How to call a function inside a function in javascript?

0 Answers  


What is the syntax of ‘self invoking function’? Give an example?

0 Answers  


How to write html code dynamically using JavaScript?

0 Answers  


Which parameter of load ()' s callback function has the data?

1 Answers  


How do you write an if statement in javascript?

0 Answers  


How do I start a javascript project?

0 Answers  


Can I learn javascript without html?

0 Answers  


How to create arrays in javascript?

0 Answers  


What do you use javascript for?

0 Answers  


What is rest parameters in javascript?

0 Answers  


How can an HTMLCollection be traversed?

0 Answers  


Categories