# \[PHP\] Month name -\> number

**URL:** <https://forum.kirupa.com/t/php-month-name-number/193040>\
**Category:** programming\
**Created:** [July 3, 2006, 9:21pm UTC](https://forum.kirupa.com/t/php-month-name-number/193040 "2006-07-03T21:21:49Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![NeoDreamer](https://avatars.discourse-cdn.com/v4/letter/n/ccd318/32.png) [@NeoDreamer](https://forum.kirupa.com/u/NeoDreamer)\
**Post date:** [July 3, 2006, 9:21pm UTC](https://forum.kirupa.com/t/php-month-name-number/193040/1 "2006-07-03T21:21:49Z")

</div>

Is there any way to convert a string containing the month name into the month number? For example, if $name = “Jan”, I want “1”.
