Thanks for your reply, i am doing a fitnerss site and i want to display the muscle of the month. This works fine with the following code:
function get_muscle(){ $month = date(F); $query = "SELECT * FROM Table_Muscle WHERE Muscle_Month = '$month'"; $result = mysql_query($query); $muscle_id = mysql_result($result, 0, Muscle_ID); $muscle_name = mysql_result($result, 0, Muscle_Name); $muscle_actions = mysql_result($result, 0, Muscle_Actions); $muscle_exercises = mysql_result($result, 0, Muscle_Exercises); echo "<p><strong>Month:</strong> $month</p> <p><strong>Muscle:</strong> $muscle_name</p> <p><strong>Actions:</strong><br> $muscle_actions</p> <p><strong>Exercises:</strong><br> $muscle_exercises </p>"; } however, i want to add a link at the bottom of the page to view previous months (i.e. Previous Month or Next Month) and this is where it gets tricky. I could increment $muscle_id but what heppens when i get to tweleve and want to revert back to january? Thanks for your input "Dl Neil" <[EMAIL PROTECTED]> wrote in message 0ebf01c29ad8$1d733c60$c900a8c0@jrbrown">news:0ebf01c29ad8$1d733c60$c900a8c0@jrbrown... > Hi Shaun, > > > please could someone tell me how i can return a month in text from an int > ie > > getMonth(12) > > returns Decmber. Is this possible? > > > No. If you want to stick with this, write your own function to look up a > text array. > > If the "12" is part of more data coming in from a form or db (for example), > then give us the wider picture and a 'built-in' solution may become > possible. > > =dn > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php