Solved

PHP Echo variable in API request

Posted on 2014-10-26
3
129 Views
Last Modified: 2014-10-26
How can I echo $lat and $long in this request?

$bizArray = file_get_contents("https://maps.googleapis.com/maps/api/place/nearbysearch/json?location=location=".$lat.",".$long."&radius=3000&key=");

Open in new window

0
Comment
Question by:seopti
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 40405263
What do you mean echo them?

(You have location twice)
0
 

Author Comment

by:seopti
ID: 40405267
I would like to use:

echo $lat;
echo $long;

in the API query string. Thanks for the location info, yes this is a mistake.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 40405270
You don't use echo, as you already have it is correct.
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

Suggested Solutions

I imagine that there are some, like me, who require a way of getting currency exchange rates for implementation in web project from time to time, so I thought I would share a solution that I have developed for this purpose. It turns out that Yaho…
Part of the Global Positioning System A geocode (https://developers.google.com/maps/documentation/geocoding/) is the major subset of a GPS coordinate (http://en.wikipedia.org/wiki/Global_Positioning_System), the other parts being the altitude and t…
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now