Y'a des restrictions lors de l'utilisation d'un foreach dans un for parceke mon script ne veut pas fonctionner ...
Voici l'engin :
for( $u=0 ; $u<$lim ; $u++ )
{
if( $appro == 0 ) {
$oidcal = $oid + $u + 1;
$trupsql = " INSERT INTO calevent VALUES bla bla ( ctrop long
)
$rosq = mysql_query( $trupsql);
$res = stripslashes( $rosq );
}else{
$oidcal = $oid + $u + 1;
$trupsql = " INSERT INTO calevent VALUES bla bla
$rosq = mysql_query( $trupsql);
$gsql = " SELECT created FROM calevent WHERE oid = $oidcal ";
$risq = mysql_query( $gsql );
$created = mysql_result( $risq, "created" );
$arr1 = explode( " ", $created );
foreach( $arr1 as $elem1 ) {
$dri[] = $elem1; }
$date1 = "$dri[0]";
echo "Chier c à partir de là ke ca marche plus";
$arr2 = explode( "-", $date1 );
foreach( $arr2 as $elem2 ) {
$do[] = $elem2; }
$cal = mktime(0,0,0,$do[1],$do[2],$do[0]);
$day = strftime( "%a", $cal );
$res = stripslashes( $rosq );
echo "Date : $do[2]/$do[1]/$do[0] Nom du jour : $day<br>";
} // if
} //for