Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread Bob
Hi Wretha, Here's some ideas: #*&%$£! to, the, it, and, or, with, too, also, a, if, Wretha"; // all lowercase $filename=strtolower($title); // uncomment next 2 lines to see what it does // $remove = array('to','the','it','and','or','with','too','also','an','if'); // $filename=str_replace($remo

[php-list] pre-determined time/date in script

2006-04-05 Thread Mark Mckee
hi all I have had a search through google and the usual php sites and forums over the last few days. I am looking for info to make a script that will display a different logo on a pre-determined date and time, ie. christmas, easter and new year etc. so far all i have managed to find is that it is

Re: [php-list] pre-determined time/date in script

2006-04-05 Thread Nick Jones
--- Mark Mckee <[EMAIL PROTECTED]> wrote: > hi all > > I have had a search through google and the usual php > sites and forums > over the last few days. I am looking for info to > make a script that will > display a different logo on a pre-determined date > and time, ie. > christmas, easter and

Re: [php-list] pre-determined time/date in script

2006-04-05 Thread Mark Mckee
> HTH, > -Nick thank you Nick. i had a feeling it would be a switch statement, but was unsure how. Thanks again Mark.. -- Mark... http://www.soddengecko.com Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTE

Re: [php-list] pre-determined time/date in script

2006-04-05 Thread Bob
Hi Mark, You could do something like this: '', "25dec" => '', ); $today = strtolower(date('dM')); foreach ($event as $daycode => $image) { if ($today == $daycode) { echo "$image"; } } ?> You'll have to modify it slightly, if you want a default image. Bob E. - Original Message

[php-list] Re: Request for PHP code adjustment

2006-04-05 Thread W. Smith
Hello Bob, again I say, thanks so much, I was able to incorporate (with a few tweaks) your code into my code, the lines to remove the extra words, I had to add _ before and after each word otherwise it removed all instances of those letters, even if they were part of another word, ("toward" bec

Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread Patrick Bierans
> the only character I can't put into the line to be removed or replaced is > ' it makes an error either write "'" or escape it with a backslash: '\'' ;) Community email addresses: Post message: php-list@yahoogroups.com Subscribe:[EMAIL PROTECTED] Unsubscribe: [EMAIL PROTECTED]

[php-list] Re: Request for PHP code adjustment

2006-04-05 Thread W. Smith
Hello Patrick, thanks for your reply, but neither of those worked, I don't know exactly why, I suspect it has something to do with the character ' being part of the instructions, the code doesn't see it as something to BE ACTED on, just part of the instructions. Any other suggestions? Thanks,

Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread James Keeline
--- Patrick Bierans <[EMAIL PROTECTED]> wrote: > > the only character I can't put into the line to be removed or replaced is > > ' it makes an error > > either write "'" > or escape it with a backslash: '\'' I don't think the second example will work. Single quotes are strong quotes. As su

[php-list] Re: Request for PHP code adjustment

2006-04-05 Thread W. Smith
I don't understand, I am trying to remove apostrophies in the text: ' how can I add that to the items to be removed without causing an error? Thanks! Wretha --- In php-list@yahoogroups.com, James Keeline <[EMAIL PROTECTED]> wrote: > > > > --- Patrick Bierans <[EMAIL PROTECTED]> wrote: > > "

[php-list] Re: Query similar to ".. where column_name contains x"

2006-04-05 Thread bab8680
I know that there is a four character minimum on full-text searches in MySQL. From the MySQL Documentation: "Any word that is too short is ignored. The default minimum length of words that are found by full-text searches is four characters." Could you use: SELECT * FROM tablename WHERE column1 LIK

Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread James Keeline
--- "W. Smith" <[EMAIL PROTECTED]> wrote: > I don't understand, I am trying to remove apostrophies in the text: > > ' > > how can I add that to the items to be removed without causing an > error? > > Thanks! > Wretha You will have to be more specific about what error you are obtaining. Howev

[php-list] Re: Query similar to ".. where column_name contains x"

2006-04-05 Thread bobsawyerdotcom
--- In php-list@yahoogroups.com, "bab8680" <[EMAIL PROTECTED]> wrote: > > I know that there is a four character minimum on full-text searches in > MySQL. From the MySQL Documentation: "Any word that is too short is > ignored. The default minimum length of words that are found by > full-text searche

Re: [php-list] Re: Query similar to ".. where column_name contains x"

2006-04-05 Thread James Keeline
> --- Bob Sawyer <[EMAIL PROTECTED]> wrote: > > > > Let's try this again... there must be some solution available. Any > > assistance will be greatly appreciated. > > > > ID COLUMN1 COLUMN2 > > -- --- --- > > 1 11,3 > > 2 1,2 4 > > 3 2,3 1,4 > > > > COLUMN1 and

Re: [php-list] Re: Query similar to ".. where column_name contains x"

2006-04-05 Thread K . LaVallee
I would suggest a reorganization of your database tables. The best way I know of to structure your items/subcategories/categories is to create 4 tables instead of 3. Your tables for 'categories' and 'subcategories' tables could stay the same. However you'd need to remove the CAT and SUB columns

Re: [php-list] Re: Request for PHP code adjustment

2006-04-05 Thread Bob
Hi Wetha, Instead of quoting the chars you don't want, it's easier and safer to quote the ones you will allow. No chance of missing any out then :-) But, if you're going to use an array, you made a mistake in your quotes in the array. As Patrick and James said, "'" (double single double) quotes

[php-list] Re: Request for PHP code adjustment

2006-04-05 Thread W. Smith
Hello Bob, I actually use Dreamweaver to do most of my editing, it is color coded and that helps quite a lot, though I do quick & dirty editing in Notepad too. I figured out why this particular apostrophe kept appearing even though I had it listed to be removed, it was actually a different sym

[php-list] Converting title

2006-04-05 Thread Bob
Hi Wretha, This maybe a more elegant solution: #*&%$£! to the Say's it and or with Hello too also a if to"; echo $title.""; $filename = strtolower($title); $filename = preg_replace("/[^a-z ]/", "", $filename); $remove = array('to','the','it','and','or','with','too','also','a','if'); $filename =