![]() |
php hjälp
Kan någon hjälpa mig .
Skulle behöva få in <?php include("includes/".$this->cat->cat_id)."openhour.php"; ?> I skriptet nedan. <?php include 'holiday.php'; $holiday = checkHoliday(date('Y-m-d')); if ($holiday == 'NULL'){ $holiday = "****här vill jag har in php include ovan******"; } echo '<span class="holiday">' . $holiday . '</span>'; ?> |
Kod:
<?php Du kan inte inkludera till en variabel. Antingen importerar du en funktion som du returnerar resultatet till variabeln eller å kör du file_get_contents() för att få filinnehållet i variabeln. |
Citat:
PHP-kod:
|
Citat:
|
Alla tider är GMT +2. Klockan är nu 09:28. |
Programvara från: vBulletin® Version 3.8.2
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Svensk översättning av: Anders Pettersson