Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8329147
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T01:40:37+00:00 2026-06-09T01:40:37+00:00

<?php include_once ‘forecastVo.php’; include_once ‘BaseVo.php’; $count=0; $json_url = file_get_contents( ‘http://maps.google.com/maps/api/geocode/json’ . ‘?address=’jaipur’&sensor=false’); //line 9

  • 0
<?php
    include_once 'forecastVo.php';
    include_once 'BaseVo.php';
    $count=0;
    $json_url = file_get_contents(
        'http://maps.google.com/maps/api/geocode/json' .
        '?address='jaipur'&sensor=false');                //line 9
    if($json_url){
        $obj = json_decode($json_url,true);

        $obj2= $obj['results'];
    }
?>

I am getting an error:

Parse error: syntax error, unexpected T_STRING in
/home/a4101275/public_html/index.php on line 9

line 9 is where I am using the file_get_contents.

What does the error mean and how do I fix it?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T01:40:38+00:00Added an answer on June 9, 2026 at 1:40 am

    You have to use your escape characters correctly. You can’t have a single-quote (') inside of a single-quote-encapsulated string. It breaks it. In order to continue the string and have PHP interpret your inner single-quote literally, you have to escape it with \.

    $json_url = file_get_contents('http://maps.google.com/maps/api/geocode/json?address=\'jaipur\'&sensor=false'); 
    

    Or you can use the alternative string encapsulator, double-quote (").

    $json_url = file_get_contents("http://maps.google.com/maps/api/geocode/json?address='jaipur'&sensor=false");
    

    For future reference, Parse error: syntax error, unexpected T_STRING usually means you have a bad string somewhere on that line.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I followed the following tutorial to build a multilingual webpage using php arrays: http://bytes.com/topic/php/answers/880915-how-develop-multi-lingual-websites-php
<?php include_once('db.php'); $location = $_POST['location']; $doctor = $_POST['doctor']; $patient_id = $_POST['patient_id']; if(($location != )
Is it more efficient to use PHP's include_once or require_once instead of using a
I have the following code: if (include_once(dirname(__FILE__).'/file.php') || include_once(dirname(__FILE__).'/local/file.php') ) { This causes an
When I try to include a file using include_once in php which shows warning
Php novice. 1.Is there anything wrong with this PHP & MySQL code? include_once db_login.php
I have a page with a list of items initially loaded from a include_once('show_calendarV2.php');
<?php include_once('booter/login/includes/db.php'); $query=SELECT * FROM shells; $result=mysql_query($query); while($row=mysql_fetch_array($result, MYSQL_ASSOC)){ $hash = @md5_file($row['url']); echo $hash
Here the code: <?php include_once 'config.php'; // Connect to database $conn = oci_connect($dbuser, $dbpasswd,
I made a while loop in php: <?php include_once(connect.php); $search=mysql_query(SELECT * from chat ORDER

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.