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: LAST, FIRST MIDDLE
Pilot's Address : ADDRESS LINE 1
#x27;s trying 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 e
y index you find 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 f
$count = 0;
while (($myrow = mysql_fetch_array($result))&&($count<20)) {
do stuff
$count++;
}
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 repl
$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 funny Scotty, now b
;);
$val_name = array("High","Medium","Low");
$fcol_name = array("high","med","low");
$count = count($val);
for ($counter = 0; $counter < $count; $counter++) {
$selected = "";
if ($val[$counter] == $priority) {
$selected = "
[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 clot
> 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
Stepha
tore them 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
"Th
. Look at the on-line manual (http://www.php.net/manual/en/) under
String Functions.
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 Mailin
> 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 Ah
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's very funny Scotty, now beam down my clothes!"
Come back tomorrow for a different sig!
Backspace a single
An example of $$variables:
Returns:
wimpymeat
smelly
ditto
wimpymeat
smelly
Now, why anyone would 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!"
er a big blanket 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&
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
gt; $pw.= substr($allowed,$pos,1);
> $i++;
> }
> 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 f
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
--
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]
s.
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://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
F
> You left some attributes off:
>
>
$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 down my clothes!"
Come back tomorro
<<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/)
> 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, e-ma
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 weeks,
> 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
> Ah now, but who would use a HP, when you've got your trusty TI? :-)
Yup, especially since all the games are on the TI, though they're pretty
scarce for the 89, my personal preference, since they're more expensive, so
fewer people have them.
The options: Get a graph-link cable (which I can't fi
> 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 onl
> 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:
talseconds / 60) . " minutes.");
to get the total number of minutes. Use ceil() instead of floor() if you
want to round up instead of down, or just echo((int)$totalseconds); to round
to the nearest integer.
Sig for a Day
Stephan Ahonen, ICQ 491101
"That's very funny Scotty, n
> Any ideas? Work arounds? I am using PHP3.
Try:
$page = str_replace("?", "&", $page);
That'll change:
include.html?page=main.html?date=12
into:
include.html?page=main.html&date=12
So the variables get passed properly.
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-
> $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];
T
> 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
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 PRO
> OC12
> 622 Mb
>
> Monthly Fee
> $550,000
>
> Setup Fee
> call (prolly between 10k and 20k)
Hmm, I think my allowance should be able to cover that. It'll really speed
up all the instant messaging I do.
Sig for a Day
Stephan Ahonen, ICQ 491101
"Don't
> Im curious to see how other php developers store their passwd's
I store it in the "universal include file" as $password["User"] = "Encrypted
password";
Then when the user logs in:
if (encryption_function($entered_password) == $password[$entered_username])
{
Do this stuff
} else{
echo("Please
I don't know about everybody else, but I learned PHP by taking a simple,
pre-existing script and upgrading it to my needs by studying the syntax and
putting in new code to do what I wanted it to, always keeping the PHP online
manual at my side. By just jumping in like that, I've managed to build a
35 matches
Mail list logo