PHP convert text function
Hi there im wondering if you can help me out.
I’m basically trying to write a function where a number will be replaced by text… but im rubbish.
Heres my situation.
- im drawing my content from a database, so it will be displayed as this:
<?php echo $row_psanews[‘psanews_datem’]; ?>
as an example the page will result in echoing: 10
I want to write a function which will convert this into text.
So I’ll change my php into:
<?php echo converter ($row_psanews[‘psanews_datem’]); ?>
converter being the name of the function, the page will result in echoing: October
.. the function would be something along the lines of
function converter (){
01 = “January”
02= "February"
etc etc
its all a major learning curb for me, and I hope im making sense here
