how to get the name of the month in php

1

What happens is that I need to get the name of the month and the year in the following way: Nov.2018, in vb.net I can do it with this code%% code but I also require it in php "some idea is I would really appreciate it

    
asked by juan perez 15.11.2018 в 16:35
source

1 answer

1

It's enough that you do it this way

<?php

echo date("M.Y");

For the value to be returned to you in the form of a word, you occupy the% co_of uppercase% and the Y for the year

you use the M method so that the aforementioned values are interpreted as year and month

As well as I do the observation, I'll add an example for a date that you pass as a dynamic value

<?php

$fecha = "2018-11-25";

echo date("M.Y", strtotime($fecha));
    
answered by 15.11.2018 / 16:43
source