funlearner Posted August 5, 2014 Share Posted August 5, 2014 Hi there, I have a timetable plugin that shows booking entries. The times are generated dynamically by the plugin. Now I have the situation where I need to override the automatically created time that shows in a table row. Here's the HTML code generated by the plugin: <tr class="row_12"> <td class="tt_hours_column">00:00</td> Ist it possible to have a simple PHP script that does the following (please forgive my noobiness) ? if table row is "row_12" then insert "my own pre-defined time" Please don't hate on me, I know I have not the slightest idea about php. I'm just wondering how to solve my plugin problem and if PHP is the right way to do it. I highly appreciate any feedback from you guys Quote Link to comment Share on other sites More sharing options...
Solution cyberRobot Posted August 5, 2014 Solution Share Posted August 5, 2014 You could look into using PHP's DOMDocument class to break apart the HTML: http://php.net/manual/en/class.domdocument.php Or if the code is simple enough, you may even be able to locate and replace the time information for "row_12" using a PHP function like strpos(). http://php.net/manual/en/function.strpos.php Quote Link to comment Share on other sites More sharing options...
funlearner Posted August 5, 2014 Author Share Posted August 5, 2014 Thanks cyberRobot! I followed your links and have to admit these examples are way over my head - so the shown code example 'a needle in a haystack' fits perfectly. I guess I have to find a php-coder who will look into my problem for me. Anyways - thanks a lot for your fast reply! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.