hi guys,,i had this problem,,I want to make a function for the days
but the days has the equivalent values.....

1-Sunday 4-Wednesday
2-Monday 5-Thursday
3-Tuesday 6-Friday and 7-Saturday

and also for the visibility

1-Active
2-Inactive

No database had been query on it..So its just a function

but the output would be the days and not the numbers..

hope you'll help me..

Days are simple, take a look at the date() function in the documentation at www.php.net for more info.

What do you mean by visibility? Of the days?

thanks for your suggestion..visibility is my another drop down and not included on days

I suppose your visibility function will look something like this then:

function getVisibility($active)
{
  if($active == true)
      return 1;
  else
      return 2;
}

However, it might be better to simply assign inactive to 0 as this maps directly to false, that way active = true and inactive = false.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.