Jump to content

Notice: A non well formed numeric value encountered


regoch

Recommended Posts

Hy!

I get this error when I run this script: Notice: A non well formed numeric value encountered in H:\index.php on line 106

Script work fine, get date out mysql and show it but show this error too. I work on small news portal and get this copy/paste from other news portal that I work on, and on that other portal showing no errors.

 

this is from mysql table: news_date timestamp  CURRENT_TIMESTAMP

	<?php	
$rezultat=mysql_query("SELECT * FROM news ORDER BY news_id DESC LIMIT 1");
while ($redak=mysql_fetch_array($rezultat))
{
	//Tu razdvaja datum na djelove
$dateArray=explode('-',$redak['news_date']);
$dan=date('d', mktime(0, 0, 0, $dateArray[1], $dateArray[2], $dateArray[0]));
$mjesec=date('m', mktime(0, 0, 0, $dateArray[1], $dateArray[2], $dateArray[0]));	
$godina=date('Y', mktime(0, 0, 0, $dateArray[1], $dateArray[2], $dateArray[0]));
//Tu pretvara broj mjesec iz broja u tekst
$mjesec_ime = array(
"01"=>"siječanj",
"02"=>"veljača",
"03"=>"ožujak",
"04"=>"travanj",
"05"=>"svibanj",
"06"=>"lipanj",
"07"=>"srpanj",
"08"=>"kolovoz",
"09"=>"rujan",
"10"=>"listopad",
"11"=>"studeni",
"12"=>"prosinac",
);
$mjesec_ime1 = $mjesec_ime[strtolower($mjesec)];
?><div id="datum_novosti_index"><span style="font-size:28px;"><?php echo $dan; ?>.</span><br /><?php echo $mjesec_ime1; ?></div>
<div id="naslov_novosti_index"><?php echo $redak['news_naslov']; ?></div>
<?php
}
?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.