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 Link to comment https://forums.phpfreaks.com/topic/290284-override-script-generated-table-data/ Share on other sites More sharing options...
cyberRobot Posted August 5, 2014 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 Link to comment https://forums.phpfreaks.com/topic/290284-override-script-generated-table-data/#findComment-1486900 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! Link to comment https://forums.phpfreaks.com/topic/290284-override-script-generated-table-data/#findComment-1486902 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.