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 9129845
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T07:50:26+00:00 2026-06-17T07:50:26+00:00

Please help me with this issue. I am trying to echo out 7 or

  • 0

Please help me with this issue. I am trying to echo out 7 or 8 input types.
The input types must have 2 values from my database.

The Arrays are called : $adressX[] and $adressY. and are automatically loaded when the webpage loads.
So when number is 0 , i want to create a input type with the value : ($adressX[0],$adressY[0]).
I keep getting parsing errors , this being my first project on php/javascript.
Please help me.
My code is like this.

<?php  

for ($number=0;$number<=$array_no-1 ;$number++)
{

 echo '<input type="text" id="inputtype"."$number"
                                 value="".$adressX['.$number'],".$adressY['.$number']">';


};
                    ?>
  • 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-17T07:50:27+00:00Added an answer on June 17, 2026 at 7:50 am

    You were messing up your quotes and periods. Try this:

    <?php  
    for ($number = 0; $number <= $array_no-1; $number++) {
       echo '<input type="text" id="inputtype' . $number . '" value="' . $adressX[$number] . ',' . $adressY[$number].'" />';
    }
    ?>
    

    You should read up on how PHP handles quotes and concatenation, but here are a few examples to get you started.

    If you want to start the string with a single quote, you must end/concatenate the string with a single quote as well. Like this:

    $var = 'yay';
    $string = 'The value of the variable is ' . $var;
    $string2 = 'The value of the variable is ' . $var . '!'; // Add another string after variable
    

    Similarly, if you start with double quotes, you have to end/concatenate with double quotes, like this:

    $var = "yay";
    $string = "The value of the variable is " . $var;
    $string2 = "The value of the variable is " . $var . "!";
    $string3 = "The value of the variable is $var!";
    

    Notice the last example, $string3. When using double quotes, you can put variables inside the quotes and PHP will still parse them; however, I don’t condone this and I ALWAYS concatenate so when using an IDE with syntax highlighting it is obvious where the variables are.

    Here is an example of putting the same type quotes in the string that you start/end the string with. To do this, you must use a slash () to tell PHP that these should be parsed as regular quotes instead of delimiters.

    $string = 'You\'re using escaped quotes now!'; // notice the \ in front of the ' in you're
    

    Lastly, here is an example of an HTML string in PHP. I usually start these strings with single quotes so that I can use the conventional double quote delimiters for the HTML.

    $html = '<div class="someClass">Hello world!</div>';
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Please help me about this issue... In my application i have calender where user
can you please help me with this issue the String class does not have
Please help, clarify this issue, I have seen it on many sites now, you
Please help me out on this explode() function issue. I am getting unexpected results
I have got one issue. Can some one please help me to resolve this?
Please help with this issue, I'm trying to populate my table cells with coreData
Please help with this issue, I'm going mad... I'm trying to make a client-server
Please help me with this issue that I am facing on production server. I
Hey friends any one please help me for this issue.in this javascript code i
Please help this would be my last problem in dealing with access database with

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.