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

  • Home
  • SEARCH
  • 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 7602009
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T23:18:14+00:00 2026-05-30T23:18:14+00:00

In my db I a have table called users. In that table I have

  • 0

In my db I a have table called users. In that table I have a field called usr_loc_id. The content of that field is a city name with its zip code. An example would be : Paris (75018)

In a php script I am at some point echoing out that field value into a custom attribute of a tr tag :

echo '<tr attrLoc='.$row['usr_loc_id'].' class='someClass'>...

My problem is as follows. When i check my debugger, I see that only the city name is take into consideration. The city code with the parenthises is left out. Here below how it looks in the debugger.

<tr attrLoc="Paris" (75018) class="someClass">...

Hope someone can help understand and solve this. Thank you in advance for your replies. Cheers. Marc.

  • 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-05-30T23:18:15+00:00Added an answer on May 30, 2026 at 11:18 pm

    You are missing quotes in the generated html. The literal text of your output is:

    <tr attrLoc=Paris (75018) class=someClass>...
    

    Note that lack of quotes. That means the browser’s parser is seeing 3 attributes in this tag:

    1. attrLoc = Paris
    2. invalid attribute (75018)
    3. classs = someClass

    With proper quoting in your PHP, you can fix this:

    echo <<<EOL
    <tr attrLoc="{$row['usr_loc_id']}" class="someClass"> ...
    EOL;
    

    or

    echo '<tr attrLoc="' . $row['usr_loc_id'] . '" class="someClass"> ...';
                      ^--missing                 ^--missing
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a table called Users ( class User < ActiveRecord::Base ) and a
I have a table called UserPermissions with a FK to the users table by
Have a table called user_products that contains a record for each product the user
I have a database table called users with a primary key of user_id for
I've got a table called users . Two of the fields in that table
I basically have two tables called images and users . The images table has
I have two tables called messages and users . In the messages table, there's
I have a table called Users it contain some fields such as Id, ParentId,
I have table called stats . In am inserting yes or no in the
I have a table called OffDays, where weekends and holiday dates are kept. I

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.