Ämne: php hjälp
Visa ett inlägg
Oläst 2016-09-28, 07:33 #2
nim nim är inte uppkopplad
Medlem
 
Reg.datum: Oct 2014
Inlägg: 248
nim nim är inte uppkopplad
Medlem
 
Reg.datum: Oct 2014
Inlägg: 248
Kod:
<?php
include 'holiday.php';
$holiday = checkHoliday(date('Y-m-d'));
if ($holiday == 'NULL'){
include("includes/".$this->cat->cat_id)."openhour.php";
$holiday = "****här vill jag har in php include ovan******";
}
echo '<span class="holiday">' . $holiday . '</span>';
?>

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.
nim är inte uppkopplad   Svara med citatSvara med citat