anpera.net
https://anpera.dyndns.org/phpbb3/

Bio fehler nach Geburt des Kindes.
https://anpera.dyndns.org/phpbb3/viewtopic.php?f=34&t=3591
Seite 1 von 1

Autor:  Shira [ Fr 20 Apr, 2007 08:20 ]
Betreff des Beitrags:  Bio fehler nach Geburt des Kindes.

Die bio funktioniert bei mir eigentlich normal, bis die User ein Kind haben. Sobald das der Fall ist komm folgender Fehler.

Fatal error: Call to undefined function: array_combine() in /www/htdocs/shira/logd/bio.php on line 127

Das ist laut bio.php foplgende Zeile.
$date = array_combine(array('day','month','year'),explode('.',$val));

Kann mir da jemand bitte helfen?

Ich hab noch nicht so viel erfahrenum was php an geht.

Autor:  Harthas [ Fr 20 Apr, 2007 08:32 ]
Betreff des Beitrags: 

[php]if (!function_exists('array_combine')){
function array_combine( $keys, $vals ) {
$keys = array_values( (array) $keys );
$vals = array_values( (array) $vals );
$n = max( count( $keys ), count( $vals ) );
$r = array();
for( $i=0; $i<$n; $i++ ) {
$r[ $keys[ $i ] ] = $vals[ $i ];
}
return $r;
}[/php]

Setz das mal in die common.php ;-)

Quelle: Hier

Autor:  Shira [ Fr 20 Apr, 2007 11:52 ]
Betreff des Beitrags: 

Danke für die andwort. jedoch bekomm ich dann eine fehler in der common.php.
Zitat:
Parse error: syntax error, unexpected $end in /www/htdocs/shira/logd/common.php on line 2036

das ist genau die letze Zeile also
Zitat:
?>


Jeodch funktioniert die bio wenn ich die fehlerhafte Zeile als
Zitat:
$date = array_combine(array('day','month','year'),explode('.',$val));
löche.

Ich hab mir noch mal die anleitung angesehen und die hat ned ganz zusammen gepasst.
Hab es raus gemacht und neu rein gemacht bei der bio. Nun funktioniert es richtig.


Hat sich nun erledigt.

Autor:  Harthas [ Fr 20 Apr, 2007 12:01 ]
Betreff des Beitrags: 

[php]if (!function_exists('array_combine')){
function array_combine( $keys, $vals ) {
$keys = array_values( (array) $keys );
$vals = array_values( (array) $vals );
$n = max( count( $keys ), count( $vals ) );
$r = array();
for( $i=0; $i<$n; $i++ ) {
$r[ $keys[ $i ] ] = $vals[ $i ];
}
return $r;
}
}[/php]

Hatte da eine Klammer vergessen.
Falls du die Funktion doch noch brauchst, wäre sie so korrekt ;-)

Seite 1 von 1 Alle Zeiten sind UTC + 1 Stunde
Powered by phpBB® Forum Software © phpBB Group
https://www.phpbb.com/