Very simple but confused.


#1

I am trying to make a tool type of thing in php for my webpage that will tell the day from a chosen date… like December 10 2009. php would return thursday.

I looked here http://www.w3schools.com/php/php_ref_calendar.asp

but im having a little trouble figuring out what to use…

If this is simple enough could some one write out the code so i can copy and paste… its the only part i am missing.

Thank you so much.


#2

No. We will not be writing your code for you. If you’re too lazy to write code, then we’re too lazy too :slight_smile: Sounds fair doesn’t it?

But since we’re not malicious or evil, here’s some pointers: Date() & MkTime()


#3

yes it does, i totally understand.
i tried this:

<?php $my_t=getdate(date("U")); print("$my_t[weekday]"); ?>

this seems right? to do what i wanted.
it worked for the current date. but am trying to get it to work for future or past dates to.


#4

It is explained perfectly in the links that I gave you. We do expect you to put some effort into it. Contrary to popular belief, we’re not a pick-up desk for PHP scripts :wink:


#5

Yes!

I finally figured it out…
Zyppora your words gave me encouragement believe me.

I was gonna give up on it. And do something different, that i knew how to do.

I went to sleep. wolk up, and boom it jumped in my head.
It was extremely easy. I don’t know what was going on with me.

Thanks again.

Once i complete the whole thing ill come back here and post the final project.
So any one else who may be doing the same thing can look at my code and copy. i don’t mind that at all.


#6

Jenround happy to hear you figured it out!! :slight_smile: We like to point in the right direction and let you create your own path to the solution!

Doesn’t it feel good to say you figured that out yourself!! :)


#7

Jerks?
No not at all.
Like i said in another post. If some stranger walked up to my door knocked and asked me to do something for him, id just close the door.
Of course unless its a hot chick.

I usually don’t ask for help, i like to figure things out myself.
But i just couldn’t, i was having what some people call a “brain fart”
So i came here seeing that you have a few smarts in here.
And it was a simple little snippet of code. Not can you convert this asp to php and all.

But . a little sleep a few cookies and voila. done.
And it wasnt the links that zyppora gave me that helped me out.
(Already had them)
It was the actual words he used. :slight_smile:
That’s why i stayed in the board and tried to help some others :)