I have converted my database from mysql to SQL server and working on exploding date and time. I am getting error: explode() expects parameter 2 to be string, This i
explode() expects parameter 2 to be string,
Try this,
$time = date('H:i:s'); $date = date('Y-m-d'); echo $time.""; echo $date.""; $pieces = explode(":", $time); echo $pieces[0]." ".$pieces[1]." ".$pieces[2].""; $pieces = explode("-", $date); echo $pieces[0]." ".$pieces[1]." ".$pieces[2];