Skip to content
View in the app

A better way to browse. Learn more.

MSFN

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Zodiac Sign

Featured Replies

hi! :) everyone!! specially to the administrator

Do anyone have an idea how to create a PHP program that will determine the month

of the given Zodiac Sign?? for instance, if the user enter Scorpio, the program displays October after he/she clicks the month button?? anyone howto please really need an idea

or maybe the code? glad to hir you!! :) thanks in advanced?

could be a problem that the signs doesn't have only 1 month ;)

mine is sagitarious born november, 29th but there are many people out there, sagitarious all, born during the first 3 weeks of december :P

a different slant on the problem would be to give the zodiac sign given a specific date.

This is do-able, you just have a list of dates and compare the user input -

semi-pseudo-code: figures/syntax not exact.

// grab user input
$date = $_POST['date']  // input could be '10 October 2005'

// convert $date to a timestamp
$timestamp = strtotime($date)  // input now timestamp - '???????????????'

// dates for zodiac are pretty much always the same so just need day number
$day_of_year = strftime( %j , $timestamp ) // give integer 1-366.

// Now we can compare to an array - i'm guessing these dates and signs!
if (22 > $day_of_year >= 1) $zodiac = "capricorn"
elseif (166 > $day_of_year >= 197) $zodiac = "leo"
elseif (275 > $day_of_year >= 305) $zodia = "scorpio"
.
.
.
elseif (356 > $day_of_year >= 366) $zodiac = "capricorn
etc

echo "Your zodiac sign is: " . $zodiac

This is just an example - search php.net for the proper syntax of the functions and the correct dates etc.

Create an account or sign in to comment

Recently Browsing 0

  • No registered users viewing this page.

Account

Navigation

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.