bk1984bgl Posted March 25, 2013 Share Posted March 25, 2013 hi guys, i just want to know, if it's possible to change the html code by time, using php. thanks a lot. bilal kuzey Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/ Share on other sites More sharing options...
requinix Posted March 25, 2013 Share Posted March 25, 2013 Probably. If you would be oh so kind as to explain what you're talking about I'm sure you could get a better answer. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1420965 Share on other sites More sharing options...
bk1984bgl Posted March 25, 2013 Author Share Posted March 25, 2013 I have a list on my page with tel: links. The shown links are the correct phone numbers. But i want to change the tel: links at 20 o'clock every day, so on a click from a Mobile phone, it should dial the noumbers i want. Otherwise the links should dial the correct Phone numbers. You can check at: www.taxi-bgl.de Thank you so much Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421003 Share on other sites More sharing options...
requinix Posted March 25, 2013 Share Posted March 25, 2013 Change where? Where are the new phone numbers coming from? How will the PHP script know what to use? Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421020 Share on other sites More sharing options...
bk1984bgl Posted March 26, 2013 Author Share Posted March 26, 2013 Change where? Where are the new phone numbers coming from? How will the PHP script know what to use? i want to use this code between 08:00PM and 04:00AM: <div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div> and between 04:00AM and 08:00PM this code: <div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div> can php change it automatically for me? or could i realise it any otherway? thanks for your help. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421083 Share on other sites More sharing options...
Joshua F Posted March 26, 2013 Share Posted March 26, 2013 (edited) I wrote this up in the quick reply box so if I made a mistake I am sorry, though it should work. $date = date('G'); if ($date >= 4 && $date <= 20) { // $date is 24 hour format // Display 04:00AM and 08:00PM } else { // Display 08:00PM and 04:00AM } date to see how and whydate('G')works if you need it. Edited March 26, 2013 by Joshua F Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421084 Share on other sites More sharing options...
bk1984bgl Posted March 26, 2013 Author Share Posted March 26, 2013 (edited) <!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="robots" content="all" /> <link rel="stylesheet" href="class.css" type="text/css" /> <title>Taxi Bergisch Gladbach</title> </head> <body> <h1>Taxi Unternehmen in Bergisch Gladbach </h1> <p id="comment">alphabetisch sortiert</p> <div id="left"> <ul id="taxi"> <li>Taxi Bajwa</li> <li>Taxi Ben</li> <li>Taxi Büyük</li> <li>Taxi Cheema</li> <li>Taxi Christmann</li> <li>Taxi Dogan</li> <li>Taxi Groos</li> <li>Taxi Heitmann</li> <li>Taxi Kaygusuz D.</li> <li>Taxi Kaygusuz N.</li> <li>Taxi Kaygusuz S.</li> <li>Taxi Küster</li> <li>Taxi Mahmood</li> <li>Taxi Nurdogan</li> <li>Taxi Özat</li> <li>Taxi Sternke</li> <li>Taxi-Ruf Bergisch Gladbach</li> <li>Taxi Wember</li> </ul> </div> <?php $date = date('G'); if ($date >= 4 && $date <= 20) { // $date is 24 hour format // Display 04:00AM and 08:00PM <div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div> } else { // Display 08:00PM and 04:00AM <div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div> } ?> <footer> <p id="comment">© 2013 freies Verzeichnis über aktuelle Taxiunternehmen in Bergisch Gladbach inkl. aktueller Telefonnummern. Angaben ohne Gewähr. Eintragung keine Pflicht. Angegebene Informationen sind im Internet auf verschiedenen Verzeichnissen zugänglich. Eintragung kann auf Wunsch gelöscht werden.<br /> <a href="mailto:info@taxi-bgl.de">info@taxi-bgl.de</a></p> </footer> </body> </html> Isnt working. You can check at www.taxi-bgl.de. Its a htm file. Maybe this is the problem. My webserver runs php and apache... Edited March 26, 2013 by bk1984bgl Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421166 Share on other sites More sharing options...
jcbones Posted March 26, 2013 Share Posted March 26, 2013 I would think that if it is a PHP file, it would need to be a .php file! Unless you told the server to parse .htm files as PHP. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421251 Share on other sites More sharing options...
bk1984bgl Posted March 26, 2013 Author Share Posted March 26, 2013 (edited) I already saved this code as index.php and loaded up my server. I couldnt see anything, just a blank page! How can i tell the server to parse .htm files as php? Edit: i copied this codes in the .htaccess file in the same directory as the index.htm is... AddHandler x-httpd-php .html .htm # (tested successfully on a GoDaddy/Apache server in December 2009) AddHandler php-script .php .html .htm AddHandler php5-script .php .html .htm AddType application/x-httpd-php .htm AddType application/x-httpd-php .html ... Just a blank page again...What else can i do? Edited March 26, 2013 by bk1984bgl Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421262 Share on other sites More sharing options...
haku Posted March 27, 2013 Share Posted March 27, 2013 Are you accessing the script through a server, or are you trying to directly load the php file in your browser? (The latter will not work) Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421301 Share on other sites More sharing options...
Joshua F Posted March 27, 2013 Share Posted March 27, 2013 No, the problem is he's putting HTML code inside of php tags without echo or anything. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421312 Share on other sites More sharing options...
bk1984bgl Posted March 27, 2013 Author Share Posted March 27, 2013 Are you accessing the script through a server, or are you trying to directly load the php file in your browser? (The latter will not work) Through a server... No, the problem is he's putting HTML code inside of php tags without echo or anything. How can i solve this problem? Sorry, i m not so good in coding... I thank you so much, for your help. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421339 Share on other sites More sharing options...
Joshua F Posted March 27, 2013 Share Posted March 27, 2013 echo $date = date('G'); if ($date >= 4 && $date <= 20) { // $date is 24 hour format // Display 04:00AM and 08:00PM echo '<div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div>'; } else { // Display 08:00PM and 04:00AM echo '<div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div>'; } This should work but it's not the prettiest thing in the world. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421341 Share on other sites More sharing options...
bk1984bgl Posted March 27, 2013 Author Share Posted March 27, 2013 echo $date = date('G'); if ($date >= 4 && $date <= 20) { // $date is 24 hour format // Display 04:00AM and 08:00PM echo '<div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div>'; } else { // Display 08:00PM and 04:00AM echo '<div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div>'; } This should work but it's not the prettiest thing in the world. Thank you so much. It works. But could you explain, what isnt so pretty with this? Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421350 Share on other sites More sharing options...
haku Posted March 27, 2013 Share Posted March 27, 2013 (edited) It's outputting a bunch of HTML using PHP. You could pretty it up a bit as follows: <?php $date = date('G'); if ($date >= 4 && $date <= 20) { // $date is 24 hour format // Display 04:00AM and 08:00PM ?> <div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div> <?php } else { // Display 08:00PM and 04:00AM ?> <div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div> <?php } ?> Edited March 27, 2013 by haku Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421356 Share on other sites More sharing options...
Joshua F Posted March 27, 2013 Share Posted March 27, 2013 (edited) Or even.. <?php $date = date('G'); if ($date >= 4 && $date <= 20): // $date is 24 hour format // Display 04:00AM and 08:00PM ?> <div id="right"> <ul id="nummern"> <li><a href="tel:+49220455555">0 22 04 / 55 5 55</a></li> <li><a href="tel:+49220231010">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922022518895">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+49220221482">0 22 02 / 21 4 82</a></li> <li><a href="tel:+49220453030">0 22 04 / 53 0 30</a></li> <li><a href="tel:+492202959000">0 22 02 / 95 90 00</a></li> <li><a href="tel:+492202982200">0 22 02 / 98 22 00</a></li> <li><a href="tel:+49220241144">0 22 02 / 4 11 44</a></li> <li><a href="tel:+492204867171">0 22 04 / 86 71 71</a></li> <li><a href="tel:+49220222022">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922029898011">0 22 02 / 98 98 011</a></li> <li><a href="tel:+49220232728">0 22 02 / 32 7 28</a></li> <li><a href="tel:+49220252841">0 22 02 / 52 8 41</a></li> <li><a href="tel:+492204911414">0 22 04 / 91 14 14</a></li> <li><a href="tel:+492202249450">0 22 02 / 24 94 50</a></li> <li><a href="tel:+49220435432">0 22 04 / 35 4 32</a></li> <li><a href="tel:+49220222222">0 22 02 / 22 2 22</a></li> <li><a href="tel:+49220422443">0 22 04 / 22 44 3</a></li> </ul> </div> <?php else: // Display 08:00PM and 04:00AM ?> <div id="right"> <ul id="nummern"> <li><a href="tel:+4922045866888">0 22 04 / 55 5 55</a></li> <li><a href="tel:+4922045866888">0 22 02 / 3 10 10</a></li> <li><a href="tel:+4922045866888">0 22 02 / 2 51 88 95</a></li> <li><a href="tel:+4922045866888">0 22 02 / 21 4 82</a></li> <li><a href="tel:+4922045866888">0 22 04 / 53 0 30</a></li> <li><a href="tel:+4922045866888">0 22 02 / 95 90 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 22 00</a></li> <li><a href="tel:+4922045866888">0 22 02 / 4 11 44</a></li> <li><a href="tel:+4922045866888">0 22 04 / 86 71 71</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 0 22</a></li> <li><a href="tel:+4922045866888">0 22 02 / 98 98 011</a></li> <li><a href="tel:+4922045866888">0 22 02 / 32 7 28</a></li> <li><a href="tel:+4922045866888">0 22 02 / 52 8 41</a></li> <li><a href="tel:+4922045866888">0 22 04 / 91 14 14</a></li> <li><a href="tel:+4922045866888">0 22 02 / 24 94 50</a></li> <li><a href="tel:+4922045866888">0 22 04 / 35 4 32</a></li> <li><a href="tel:+4922045866888">0 22 02 / 22 2 22</a></li> <li><a href="tel:+4922045866888">0 22 04 / 22 44 3</a></li> </ul> </div> <?php endif; ?> Either way they do the same thing. Edited March 27, 2013 by Joshua F Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421361 Share on other sites More sharing options...
haku Posted March 27, 2013 Share Posted March 27, 2013 I actually prefer your method - it's clearer as to what is happening when you are looking at the end of the code. Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421363 Share on other sites More sharing options...
Solution bk1984bgl Posted March 27, 2013 Author Solution Share Posted March 27, 2013 Thank you so much! Quote Link to comment https://forums.phpfreaks.com/topic/276133-change-html-code-content-by-time-with-php-possible/#findComment-1421365 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.