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

Basic methods for opening a popup window using javascript?

919


How to count the number of element in an array using javascript?

1043


how can we retrieve value from one database server and store them another database server using sql server code

2031


What are the three core languages in web pages?

989


What is "this"?

882


What's Prototypes for JavaScript

2135


How to make elements invisible?

1072


Where should I put script tags?

825


Do unused imports affect performance javascript?

1478


What is Number object in JavaScript?

1009


How do you write an if statement in javascript?

876


What is the method for reading and writing a file in javascript?

922


What and where are the best javascript resources on the web?

922


What are the primitive data types in JavaScript?

982


How do I run javascript in chrome?

916