[PHP] Need some RegEx help

2001-07-19 Thread Stephan Ahonen
Okay, I've been asked to take a bunch of HTML pages and turn them into Excel spreadsheets by running them through a PHP script and outputting a semicolon-delimited text file. The pages are in this format: Name: bLAST, FIRST MIDDLE/b Pilot's Address : bADDRESS LINE 1/b

Re: [PHP] OT question..

2001-05-08 Thread Stephan Ahonen
to get crawl into absolute power so we can recognize it and prevent it when it happens. Sig for a Day Stephan Ahonen, ICQ 491101 That's very funny Scotty, now beam down my clothes! Come back tomorrow for a different sig! Backspace a single s to reply by email -- PHP General Mailing List (http

Re: [PHP] Can php give me row number?

2001-05-06 Thread Stephan Ahonen
the word in is the line number. To save a couple lines of code, use the file() function, it returns the contents conveniently pre-split into the array. Sig for a Day Stephan Ahonen, ICQ 491101 That's very funny Scotty, now beam down my clothes! Come back tomorrow for a different sig! Backspace a single

Re: [PHP] Better way (if...elseif...else)

2001-03-30 Thread Stephan Ahonen
if($priority==$p_arr[$x]) { $pstr.="selected"; $fcol=$fc_arr[$x]; } $pstr.="$ptext_arr[$x]\n"; } Even better! This looks like to winning entry for our mini-programming contest. =) Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funn

Re: [PHP] Better way (if...elseif...else)

2001-03-29 Thread Stephan Ahonen
Low"); $fcol_name = array("high","med","low"); $count = count($val); for ($counter = 0; $counter $count; $counter++) { $selected = ""; if ($val[$counter] == $priority) { $selected = " selected"; $fcol = fcol_name[$counter]; } //if $pstr .= &quo

Re: [PHP] The ubitquitous forum project

2001-03-26 Thread Stephan Ahonen
[Explanation of UBB-style] ...And that's USENET-style. In OE I can expand and contract threads at will, like you mentioned, and I can tell which posts are in reply to which other posts. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!"

Re: [PHP] Decrypt Function?

2001-03-25 Thread Stephan Ahonen
on the server, nobody can see the actual passwords. Now when someone tries to login with one of those passwords, you crypt the password he enters, compare it with the version on the server, and if they match, it's the right password. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty

Re: [PHP] The ubitquitous forum project

2001-03-25 Thread Stephan Ahonen
Any advice? USENET style threads. I *really* hate Phorum-style threads, where everything's just tacked onto the end. Though Phorum-style is easier, it really detracts from the conversation when you have to write whose post you're replying to in your replies. Sig for a Day Stephan Ahonen, ICQ

Re: [PHP] Script to convert # of seconds to HH:mm

2001-03-19 Thread Stephan Ahonen
Oh in addition this won't work accurately if $time is greater than about 2 billion(2147483648 I believe). This shouldn't be a problem unless you're calculating how many hours and minutes a really old guy (68) has been alive or something. Sig for a Day Stephan Ahonen, ICQ 491101 "That's

Re: [PHP] update two frames at once?

2001-03-12 Thread Stephan Ahonen
tionframeset.html" target="section", and put a frameset pointing to separate title and content pages in the sectionframeset.html Clear as mud? Take a look at http://www.geocities.com/tfc_squad/, my attempt at a web page for an ill-fated TFC clan. Sig for a Day Stephan Ahonen, ICQ 491101 "That

Re: [PHP] what does $$ mean?

2001-03-05 Thread Stephan Ahonen
uld want to write a script that returns words like "wimpymeat" is beyond me. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- PHP Gen

Re: [PHP] date

2001-03-04 Thread Stephan Ahonen
folder for each entry, you put variables (?) for the timestamp, the general contents of the entry, etc. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by ema

Re: [PHP] How to convert a date to an int?(Need help as soon as possible)

2001-03-02 Thread Stephan Ahonen
http://www.php.net/manual/en/function.strtotime.php No need to code it yourself, just say $timestamp = strtotime($livedate) Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single &q

Re: [PHP] Way to generate Passwords

2001-03-01 Thread Stephan Ahonen
return $pw; } My questions is, if this is a good or bad way? It's a whole lot better than using real words. As long as you encrypt the passwords using a good one-way hash when you store them on the server, you should be fine. Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty,

Re: [PHP] How to wrap output of formatted text

2001-02-26 Thread Stephan Ahonen
There's a PHP function that does this. See: http://www.php.net/wordwrap Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- PHP Genera

Re: [PHP] VIRUS ON LIST?

2001-02-01 Thread Stephan Ahonen
You left some attributes off: joke type="bad" ratingOutOf10="2" $retaliation = explode("",$badjoke); Either that, or: $joke = str_replace($badjoke,$goodjoke,$joke); Sig for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam d

Re: [PHP] Want to learn PHP

2001-02-01 Thread Stephan Ahonen
for a Day Stephan Ahonen, ICQ 491101 "That's very funny Scotty, now beam down my clothes!" Come back tomorrow for a different sig! Backspace a single "s" to reply by email -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional comm

Re: [PHP] contracting consulting (was [PHP] Pricing for PHP pr ogramming???)

2001-02-01 Thread Stephan Ahonen
How about making a mailing list for job postings, i.e. [EMAIL PROTECTED]? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]

Re: [PHP] Problem with a regex!

2001-01-29 Thread Stephan Ahonen
Your not going to find {title} when $var = "TITLE". Everything PHP is case sensitive. If it absolutely *has* to be case insensitive, you can use eregi instead of ereg. -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands,

Re: [PHP] Problem!

2001-01-29 Thread Stephan Ahonen
1. $date = "20010101"; How could I output 01 01 2001 (or make it 3 variables, like day, month, year)? $year = substr($date,0,4); $month = substr($date,4,2); $day = substr($date,6,2); ...Assuming that the date is stored in mmdd format. -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Good Reads

2001-01-27 Thread Stephan Ahonen
As much as reading a book is helpful in getting you started really quick, I was able to do most of my learning by taking a simple "web page on a template" script, studying the syntax, and trying to improve it, keeping the language reference nearby for the stuff I didn't know. After a couple

Re: [PHP] expressions

2001-01-26 Thread Stephan Ahonen
if ($co_area != !ereg("([0-9]{3})",$co_area)) { echo " * Area code must be 3 digital"; } I don't know anything about ereg and regex, so if there's an error in that part I won't be able to help with that, but I can tell you that ($something != !$something_else) is a double negative, it's like

Re: [PHP] Greek PHP mailing list

2001-01-24 Thread Stephan Ahonen
Ah, the good ol' days of sitting in college Match classes not understanding all those letters on the chalkboard. :-) At least you're not sitting in high school calculus and actually understanding everything on the board, but not being able to use any of it because Texas Instruments is the only

Re: [PHP] News gateway question

2001-01-23 Thread Stephan Ahonen
Is there any easy way to post to the group instead? I'm reading and posting from the very handy news://news.php.net server they have set up. It's just the coolest! =) -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail:

Re: [PHP] get last directory of a full path? (parent directory)

2001-01-20 Thread Stephan Ahonen
$i = 1; foreach ($dirs as $value) { if ($i == ($numberofelements-1)) $lastdir = $value; if ($i == $numberofelements) $file = $value; $i++; } I don't think the foreach is necessary - Why can't you just say: $lastdir = $dirs[$numberofelements-1]; $file = $dirs[$numberofelements]; That

Re: [PHP] Profanity Filter

2001-01-19 Thread Stephan Ahonen
I'd make it an array: $filter = array(moron, idiot, pratt); foreach($filter as $badword) { if (strstr($name, $badword)) { do this if it contains one of the bad words } else { do this if it doesn't } } -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL

Re: [PHP] Profanity Filter

2001-01-19 Thread Stephan Ahonen
I don't like arrays, because then it requires a programmer to add dirty word... You could probably make an addbadwords.php that loads the filterbadwords.php, does some stupid PHP tricks(tm) to find the line that defines the array, then writes the filterbadwords.php back out with the new words