1
I need to take just the month of a date that comes by a $request
. But I don’t know how to do it:
if ($request->parcelas > 1) {
$mes = $request->data_vencimento = date('m');
for($i = 0; $i <= $request->parcelas; $i++) {
if($request->data_vencimento = date('m') == 12 ){
$mes = 1;
}
var_dump($request->data_vencimento = date('Y-'. $mes . '-d'));
$mes ++;
}
}
Date comes in format dd/mm/yyyy
That way he gets the current date. Someone can help me?
In what shape it comes?
– novic
@Virgilionovic dd/mm/yyyy
– Felipe Paetzold