Jump to content

golles

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Profile Information

  • Gender
    Not Telling

golles's Achievements

Member

Member (2/5)

0

Reputation

  1. Edit; I would like to get those as 2 different [7] => 841290/842030 [9] => 841110/841115 if those are done too, then I can continue on my own again.
  2. I would like to get those as 2 different [7] => 841290/842030 841110/841115 if those are done too, then I can continue on my own again.
  3. that gave the same result this is the complete table btw <table> <tr> <td>0</td> <td>-15.75</td> <td>/942480/</td> <td>26.37</td> </tr> <tr> <td>1</td> <td>-10.567</td> <td>/941750/</td> <td>25.39</td> </tr> <tr> <td>2</td> <td>-12.267</td> <td>/945955/</td> <td>25.07</td> </tr> <tr> <td>3</td> <td>-12.233</td> <td>/941230/</td> <td>25.07</td> </tr> <tr> <td>4</td> <td>-5.683</td> <td>/978100/</td> <td>25.07</td> </tr> <tr> <td>5</td> <td>-1.183</td> <td>/975600/</td> <td>24.2</td> </tr> <tr> <td>6</td> <td>-3.667</td> <td>/824110/</td> <td>23.53</td> </tr> <tr> <td>7</td> <td>-2.15</td> <td>/841290/842030/</td> <td>22.91</td> </tr> <tr> <td>8</td> <td>-0.583</td> <td>/841010/</td> <td>22.68</td> </tr> <tr> <td>9</td> <td>-1.033</td> <td>/841110/841115/</td> <td>22.3</td> </tr> </table>
  4. No the table is not generated by me. its from an application. This did allmost the trick: it only not does the ones like /841110/841115/ $search = "'/([^<]*)/'s"; result: Array ( [0] => 942480 [1] => 941750 [2] => 945955 [3] => 941230 [4] => 978100 [5] => 975600 [6] => 824110 [7] => 841290/842030 [8] => 841010 [9] => 841110/841115 ) how could the $search do them all?
  5. I want to replace the numbers with their name from the database.
  6. Okee, how would you do it?
  7. Hey, I have a (generated) table with some numbers I'd like to change to their name (database) the number is in this format: <td>/978100/</td> or <td>/841110/841115/</td> I think it could be done with preg_match_all, but I have no clue how where to search on $search = "???"; preg_match_all($search, $table, $matches); foreach ($matches as $m){ //replace the matches with their names here } Or is this really stupid? Thanks in advance!
  8. Hey PHP Guru's, I'm looking for some help to get some pieces from a string. I have a string with HTML and some tags like: {NC:type:image(1,2,3)} and {NC:type:html} I want to replace those tags like this: {NC:type:image(1,2,3)} -> $string1 {NC:type:html} -> $htmlstring I'm looking forward to your brilliant reply's
  9. thanks, I just noticed that there was a title on the td to, but i fixed it myself (with your example!) preg_replace("#^(<tr[^>]*)>(?=.*?(<td[^>]*)>Hello</td>)#m", "$1" . ' class="bgRed">', $html); thanks cags and salathe!!! I think I need some more experience with the regex stuff
  10. This will return the following error: Hopefully you know a solution
  11. Thanks! Now it works almost perfect, if the table has a title, then it doesn't work, how can this be fixed? thank you salathe, thanks! -golles
  12. I don't think I'm really clear, sorry for that! I think this topic belongs in PHP Regex forum... this is an example of the input <table class="mytable" cellspacing=0> <tr><td>22-11-2009</td><td>5886</td><td>Hello</td><td>-</td><td>World</td><td class='aR'>16</td><td class='tbr'>- 11</td></tr> <tr><td></td><td>6525</td><td>See</td><td>-</td><td>This</td><td class='aR'>6</td><td class='tbr'>- 4</td></tr> <tr><td>22-11-2009</td><td>5886</td><td>Hello</td><td>-</td><td>Everyone</td><td class='aR'>16</td><td class='tbr'>- 11</td></tr> <tr><td></td><td>6525</td><td>See</td><td>-</td><td>This</td><td class='aR'>6</td><td class='tbr'>- 4</td></tr> </table> Now i would like to change the output to this: <table class="mytable" cellspacing=0> <tr class="bgRed"><td>22-11-2009</td><td>5886</td><td>Hello</td><td>-</td><td>World</td><td class='aR'>16</td><td class='tbr'>- 11</td></tr> <tr><td></td><td>6525</td><td>See</td><td>-</td><td>This</td><td class='aR'>6</td><td class='tbr'>- 4</td></tr> <tr class="bgRed><td>22-11-2009</td><td>5886</td><td>Hello</td><td>-</td><td>Everyone</td><td class='aR'>16</td><td class='tbr'>- 11</td></tr> <tr><td></td><td>6525</td><td>See</td><td>-</td><td>This</td><td class='aR'>6</td><td class='tbr'>- 4</td></tr> </table> The table rows with a cell with the text "Hello" should have a class (bgRed), so I can style the complete row. How can this be done? I hope this makes some more sense. -golles
  13. I have a table with rows like this: <tr> <td>String</td> <td>int</td> <td>String</td> <td>String</td> <td>String</td> <td class='aR'>int</td> <td class='tbr'>String</td> </tr> If one of the Strings is $highlight (loaded from the database) I would like to change it to the following: <tr class="highlight"> <td>String</td> <td>int</td> <td>String</td> <td>String</td> <td>String</td> <td class='aR'>int</td> <td class='tbr'>String</td> </tr> I hope you understand it now.
  14. Hello!! I hope someone can help me with preg_replace. I load two tables from an external website, now I would like to highlight a complete tr (background color) if there is a td with a known string in it. So, how can I do this? Thanks in advance! -golles
  15. Hello, I'm wondering if someone knows a tutorial to upload photo's with the "Publish this folder to the web" wizard from Windows. (image source: google)
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.