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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T02:45:48+00:00 2026-06-08T02:45:48+00:00

Im trying to get td fields from a table with the id sid-120390923 or

  • 0

Im trying to get td fields from a table with the id sid-120390923 or sid-38737122 ignoring any other id value in the table, however the problem is that I can not get these td fields because they all have a slightly different id but with the same start (‘sid’).

what I want is to be able to grab all the td fields with the starting id sid-, would there be a way to incorporate regex?

here is an example

html

<table>
   <tr>
      <td id='9sd'></td>
      <td id='10sd'></td>
      <td id='sid-1239812983'></td>
      <td id='sid-1454345345'></td>
      <td id='sid-2342345234'></td>
      <td id='sid-5656433455'></td>
      <td id='sid-1231235664'></td>
      <td id='sid-8986757575'></td>
      <td id='sid-1232134551'></td>
   </tr>
</table>

simple_html_dom

$table = $con->find('table');

foreach($table->find('td#sid-1232134551') as $field){
   echo $field."<br>";
}
  • 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-08T02:45:50+00:00Added an answer on June 8, 2026 at 2:45 am

    You can use attribute filters (the 5. tab),

    $table->find('td[id^=sid-]');
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have been trying to get a custom Value from the Custom Field that
I am trying to get the value of the text in the input fields.
I need to get two fields from a database table (retrieved using linq-to-sql), one
I am trying to get some data fields in a table in a html
I am trying to get a single result from a table row I'm using
I'm trying to get column names from a table. I want to supply the
I am trying to retrieve fields from a table in a SQLite database. I've
I'm having some problems. I am trying to get a table to update, however
I am trying to select some fields from one table and insert them into
Introduction: I'm trying to get additional fields to log with log4j, and its working

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.