Warning: date() expects parameter 2 to be long, string given in

Posted by Simon on Stack Overflow See other posts from Stack Overflow or by Simon
Published on 2010-07-20T20:25:53Z Indexed on 2012/11/11 17:01 UTC
Read the original article Hit count: 122

Filed under:
|
|

its the

$birthDay = date("d", $alder); $birthYear = date("Y", $alder);

i dont know what it is

here is my code

        //Dag
            $maxDays = 31;
            $birthDay = date("d", $alder);
            echo '<select name="day">';
            echo '<option value="">Dag</option>';
            for($i=1; $i<=$maxDays; $i++)
            {
            echo '<option '; if($birthDay == $i){ echo 'selected="selected"'; } echo ' value="'.$i.'">'.$i.'</option>';
            }
            echo '</select>';

        //Måned
            echo '<select name="month">';
            $birthMonth = date("m", $alder);
            $aManeder = 12;
            echo '<option value="">Måned</option>';
            for($i = 1; $i <= $aManeder; $i++)
            {
            echo '<option '; if($birthMonth == $i) { echo 'selected="selected"'; } echo ' value="'.$i.'">'.$ManderArray[$i].'</option>';
            }
            echo '</select>';


        //År
            $startYear = date("Y");
            $endYear = $startYear - 30;
            $birthYear = date("Y", $alder);
            echo '<select name="year">';
            echo '<option value="">år</option>';
            while($endYear <= $startYear)
            {
            echo '<option '; if($birthYear == $endYear) { echo 'selected="selected"'; } echo ' value="'.$endYear.'">'.$endYear.'</option>';
            $endYear++;
            }
            echo '</select>';

© Stack Overflow or respective owner

Related posts about php

Related posts about date