Jump to content

golles

Members
  • Posts

    34
  • Joined

  • Last visited

    Never

Everything posted by golles

  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)
  16. Hey, I want to make a photo album. I noticed that some websites allow file upload from windows with the "publish this folder to the web" function in explorer. I did a search on the web but I couldn't find a tutorial or explanation for this. I already found out that the user has to integrate something to the register. Anyone who can help me getting started? thnx
  17. I don't think you really read my post, I knew how to change the cursor... please look at the online example...
  18. Guys, I found a script that does a crosshair hover on a table. (Online example) I was testing and noticed that does the crosshair hover on every table on the page. I would like to do the crsoohair hover on just one table with a class or id. the problem is that I don't know how to do this... <html> <head> <style type="text/css"> .hoverRow { background-color: #FFFF00; } .hoverColumn { background-color: #FFFF00; } .hoverCell { background-color: #FFFF00; } </style> <script type="text/javascript"> function hoverOver() { this.parentNode.className = "hoverRow"; var rowElements = this.parentNode.parentNode.childNodes; // Check in which column the this cell object is at the moment. var column = 0; var o = this; while (o = o.previousSibling) column++; for (var row = 0; row < rowElements.length; row++) { if (rowElements[row].nodeType != 1) continue; rowElements[row].childNodes[column].className = "hoverColumn"; } this.className = "hoverCell"; } function hoverOut() { this.parentNode.className = ""; var rowElements = this.parentNode.parentNode.childNodes; // Check in which column the this cell object is at the moment. var column = 0; var o = this; while (o = o.previousSibling) column++; for (var row = 0; row < rowElements.length; row++) { if (rowElements[row].nodeType != 1) continue; rowElements[row].childNodes[column].className = ""; } } function init() { var rowElements = document.getElementsByTagName("tr"); for (var row = 0; row < rowElements.length; row++) { columnElements = rowElements[row].childNodes; for (var column = 0; column < columnElements.length; column++) { columnElements[column].onmouseover = hoverOver; columnElements[column].onmouseout = hoverOut; } } } window.onload=init; </script> </head> <body> <table border="1" cellspacing="0"> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> </table> <br /><br /><br /><br /><br /><br /> <table border="1" cellspacing="0" class="onlythis" id="onlythis"> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> <tr> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> <td>Some Table Data</td> </tr> </table> </body> </html> note: this is just a temp test file!
  19. golles

    tr: hover

    I knew it should be posible! you're my hero now I came with the idea to do a crosshair hover. I'll post in the javascript forums for someone who is interested
  20. golles

    tr: hover

    okee, thank you all
  21. golles

    tr: hover

    I was allready thinking something like that... But there should be a way (CSS) to do this (also hover the td's with a bg color)?
  22. golles

    tr: hover

    Hee, I made a nice php script that loads some tables from an other website. now I'm having trouble with the tr: hover. in the rows are 3 td's with a class (tbl) and they don't hover with the row Piece of the css td.tbl { border-right-width: 1px; background-color: #f7f7f7; } .standen tr:hover { background-color: #FFFF00; } here is the table Hope someone can help me out!
  23. That was what I needed! thank you!
  24. Hey guys, I have some experience with PHP, but this is something I can't figure out, not even with google... I want to get the date of the monday of a know week and year so for example 20 and 2008 would return 5-12-2008, 19 and 2008 would return 5-5-2008 Hopefully someone can help me kind regards, golles
×
×
  • 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.