Solved

PHP Echo variable in API request

Posted on 2014-10-26
3
134 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
PHP Installer 5 37
What if i make webbased alternative for MS Access 5 67
jQuery force form POST 7 44
Add a loading gif while php runs server side 15 29
Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

839 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