/    Sign up×
Community /Pin to ProfileBookmark

How do you Increase a column width in PHP?

I am sure this is quite simple but I cannot figure this out. Ijust want to increase the column sizes so the information in each column does not seem bunched up which causes it to extend onto a second line.

Any help with this?

Thanks

to post a comment
PHP

3 Comments(s)

Copy linkTweet thisAlerts:
@NightShift58Jan 13.2007 — This is actually HTML/CSS. It would be something like [b]<td nowrap>[/b] or better, [b]<td style='white-space: nowrap;'>[/b] or the same definition included in CSS and used with "class":
Copy linkTweet thisAlerts:
@sac8513authorJan 13.2007 — Yea I knew it was something simple like that. Just couldnt think of that proper attribute. Thanks

Now let me ask you (you were actually helping me out with this the other night). I have finished developing the code that allows me to access a specific database and output the hours of operations for the particular business.

The code is now modified in conjunction with the server time to now output "open" or "closed" accordingly. The problem I have run into is that for each day of the week there are different hours of operation. I figure i will have to creat a new table with the days of the week along with thos hours.

Any idea of how to create such a loop in php ?
Copy linkTweet thisAlerts:
@NightShift58Jan 14.2007 — I don't know what will make more sense in your application in the long run but you have options. You could:

(1) modify your current table to hold the opening and closing times for each day of the week in a single record for each store, or

(2) create an additional table where each record contains the opening and closing times for each store for each day.

The "proper" way would be option 2. However, because we are dealing with days of the week, which is a limited set, and because we can expect that all stores will have times for all 7 days of the week, option 1 is more practical and you should use that one.

After modification, your table could look like this:<i>
</i>store_id int(5)
store_offset int(2)
Sun_open time(4) {format: "HH:MM")
Sun_close time(4)
Mon_open time(4)
Mon_close time(4)
...
...
Sat_open time(4)
Sat_close time(4)
Use "store_offset" to store the time difference between the store's time zone and the server's.

You can use [b]date("D")[/b] to determine the "Sun" through "Sat" of a given day. Instead of "Sun, Mon,..., Sat". you could use "d0,d1,...d6" instead and use [b]date("w")[/b] to get the corresponding day-of-week information.

Make sure that the opening and closing times fields are defined as type TIME with a length of 4. Then, when comparing the current time to the store's, you can use [b]date("HH:ii")[/b] to get the server's current time in HH:MM format.
×

Success!

Help @sac8513 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.6,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...