Re: [PHP] hello

2001-01-15 Thread Stephan Ahonen

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 an
acceptable knowledge of the language in about a month.


-- 
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] password()

2001-01-15 Thread Stephan Ahonen

> 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 don't hack the llamas");
}

I'm serious about that last bit: Anyone who types in a wrong password gets a
"Please don't hack the llamas" message.


-- 
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] phpwebhosting.com

2001-01-17 Thread Stephan Ahonen

> 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 eat that, you'll spoil your dinner. And while you're at it, get me
one."
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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 added to the array... I did something similar with a news adder script
for wheezebucket.com.


-- 
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] 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 way you're not traversing the entire array, you're just getting what
you need, more efficient. Now if only you could work with files the same way
you can with arrays...


-- 
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] Include statement problems

2001-01-21 Thread Stephan Ahonen

> 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-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to count time in php

2001-01-22 Thread Stephan Ahonen

{code snipped}

You could probably simplify this a bit with mktime(). The syntax is
mktime(hours, minutes, seconds):

$minsec = explode(":", $time);
$numsecs += mktime(0, $minsec[0], $minsec[1]);

That'll give you the number of seconds. Then at the end, you can say:

echo(floor($totalseconds / 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, 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 company that's figured out how to do
algebraic manipulation, and you can't exactly run a server on your
calculator. =)

Those little calculators are really fun for making stupid programs during
study hall, though.


-- 
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] Greek PHP mailing list

2001-01-25 Thread Stephan Ahonen

> 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 find ANYWHERE), or make
your own during study hall, making them sufficiently stupid that the code
can be compressed down to a screenful:

kyk():Prgm:Local a,b,c:13->a:"|+|"->b:ClrIO:Output
0,-1,left(b,a)&"¥"&right(b,a):While abs(13-a)<13:getKey()->c:If abs(50-c)=1
Then:a+c-50->a:Output
0,-1,left(b,a)&"¥"&right(b,26-a):EndIf:EndWhile:EndPrgm

Play with the 1 and 3 keys. Guess what it does by just looking at the code,
and win a free donut (should arrive within 6-8 weeks, and shouldn't be too
stale by then). 1 and 3 have character codes 49 and 51, respectively, if you
want to take this on...


-- 
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] 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 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] Way to generate Passwords

2001-03-01 Thread Stephan Ahonen

> function passwort($laenge)
> {
> $allowed =
> "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ01234567890:-+=";
> $allowed_length = strlen($allowed);
>
> $i=0;
> $pw = "";
>
> while ($i<$laenge) {
> $pos = rand(0,$allowed_length);
> $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 fine.

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]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 "s" to reply by email


-- 
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] date

2001-03-04 Thread Stephan Ahonen

>   Can you mark the date when an entry is placed in the db and then get
that
> date to display  when the info is pulled out

I'd put the UNIX timestamp of the entry date into a sort of parallel entry.
I don't know how DBs work, (never had a mySQL server to play with =( ) but
under 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" to reply by email


-- 
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] what does $$ mean?

2001-03-05 Thread Stephan Ahonen

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!"
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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] update two frames at once?

2001-03-12 Thread Stephan Ahonen

In the index page (change cols amounts to suit your layout):








Put the menu in menu.html (duh), but here come the fun part. In
section.html:








Then in the menu frame, to update the section frames: , 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'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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to convert '2001032018' -> '2001 03 20 18' ? (Fomating Date)

2001-03-20 Thread Stephan Ahonen

> I'm trying to convert the timestamp '2001032018' into '2001 03 20 18' or
an
> Array which I can easily format. Do you remember any date or string
function
> I can use?

Convert the timestamp into a string, then use substr() to get the dates out
of it. 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 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] Can php give me row number?

2001-05-06 Thread Stephan Ahonen

> Now I also wan´t to know to in which row the word was found.
> Is there a simple way to add some code?

You could explode the file into an array with "\r\n" as the delimiter before
you do the search, then iterate through the resulting array to look for the
word, then the array 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 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] OT question..

2001-05-08 Thread Stephan Ahonen

> I ment the signature signed by Adolf Hitler. As a German I doesnt like
> such nonsense. BTW I'm also a webmaster @ php.net.

I side with Christian here - The only way we can prevent mistakes like the
whole Hitler thing is to learn about them, and know what it looks like when
someone'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 email


-- 
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] Decrypt Function?

2001-03-25 Thread Stephan Ahonen

<< Is there any way to decrypt dat encrypted using the crypt function? If
not, then what purpose does that function have? >>

Crypt cannot be decrypted. One use of the function is for storing passwords
on a server where people can access them. If you crypt the passwords before
you store 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
"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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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!"
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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-03-29 Thread Stephan Ahonen

> $val = array("000","050","100");
> $val_name = array("Low","Medium","High");
> $count = count($val);
> $counter = 0;
> while ($counter < $count)
> {
> if ($val[$counter] == $priority)
> {
> $selected = " selected";
> }
> echo " value=\"$val[$counter]\"$selected>$val_name[$counter]";
> $counter++;
> }

Not quite... You need to reset $selected so that you don't end up with them
all being selected when $priority="000". It's a pretty clever idea, though.

I've rearranged stuff a bit to make it look prettier, and to match the
original functionality closer. Nothing personal, but I can't stand it when
people use while for stuff that looks prettier as a for. =)

$val = array("000","050","100");
$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 = " selected";
  $fcol = fcol_name[$counter];
 } //if
 $pstr .= "$val_name[$counter]\r\n";
} //while

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]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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

2001-03-30 Thread Stephan Ahonen

> $p_arr=array("000","050","100");
> $fc_arr=array("high","med","low");
> $ptext_arr("High","Medium","Low");
> for($x=0;$x {   $pstr.=" 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 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] How to limit a WHILE statement?

2001-04-02 Thread Stephan Ahonen

$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 reply by email


-- 
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]




[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: LAST, FIRST MIDDLE
Pilot's Address : ADDRESS LINE 1
  ADDRESS LINE 2
(Some stuff that doesn't go on the final spreadsheet)
Pilot Certificates  : Pilot Certification
Sub-certification
Sub-certification
: Pilot Certification
Sub-certification
Sub-certification

I don't know ANY regex, being a somewhat new PHP programmer, but using some
cut and paste, I've managed to get the name and address out like this:

",$pilotlist);

for ($x = 0; $x < count($pilotarray); $x++)
{
ereg("Name: (.*), (.*)
Pilot's Address : (.*)
  (.*)
(.*):", $pilotarray[$x], $out);

$firstmid = explode(" ",$out[2]);
echo("$firstmid[0];");
if (count($firstmid)==2) echo($firstmid[1]);
echo (";$out[1];$out[3];$out[4]");
}

?>

Now, stop laughing. I can't figure out how to add the pilot certifications
on there, since (.*) is just about the extent of my regex knowledge. Each
pilot on the list has a different number of certifications and
sub-certifications. If anyone can help at all, even if it's just pojnting me
to a good Regex tutorial, I'd be much obliged.


-- 
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] 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 saying "I can't not
program in PHP." You might as well say ($something == $something_else), save
the obfuscation factor.

Since you want to do something when ereg is false, you should say:

if (!ereg(...)) {
  Do a bunch of stuff;
}


-- 
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] 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 weeks,
I had a good idea what all the functions did and only needed the reference
to look up the syntax... Now I can code most of the functions I need from my
head, and I didn't have to spend a single cent. (Sorry, book authors...)


-- 
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, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




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 unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] VIRUS ON LIST?

2001-02-01 Thread Stephan Ahonen

> 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 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 commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]




Re: [PHP] Want to learn PHP

2001-02-01 Thread Stephan Ahonen

> Where do I start?

I got started when I wanted to upgrade a site I co-run to some semblance of
automation, so we got a guy who knew PHP to do it for us... He started
working on a webn-page-in-a-template script, but wasn't able to finish it
due to schoolwork. I decided to try my hand at it, so I looked at the code
(thankfully, it wasn't as complicated as some of the stuff I see on here -
oy vey), got a general idea of what everything did by looking at it, and
started improving it. The online manual at http://www.php.net/manual/en/ was
extremely helpful for looking up 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 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] 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]